tngh5004 / Omnistitch

This project is the official implementation of our ACM MM 2024 paper, OmniStitch: Depth-aware Stitching Framework for Omnidirectional Vision with Multiple Cameras
4 stars 0 forks source link

FLOPs calculation #3

Open DMH517 opened 2 weeks ago

DMH517 commented 2 weeks ago

Hello author, I have a question regarding the modification of the FLOPs calculation in your project. Could you please provide more specific guidance on how to implement this change? Should I be looking at the forward() method within the Model class in core/model/omnistitch.py? Thank you for your help!

图片1
tngh5004 commented 2 weeks ago

We recommend this setting.

def forward(self, img0, pyr_level=None, nr_lvl_skipped=None):
                img1 = img0.copy()
                if pyr_level is None: pyr_level = self.pyr_level
                if nr_lvl_skipped is None: nr_lvl_skipped = self.nr_lvl_skipped

It's safe to assume that the amount of computation, or FLOPS, in your model will be the same, even though you're using a duplicate of the image.

DMH517 commented 2 weeks ago

Following your guide, I successfully got the FLOPs, but with a slight outlier from the data you provided. (I use img1 = img0.clone() instead of img1 = img0.copy() to avoid reporting the error) image

tngh5004 commented 2 weeks ago

Following your guide, I successfully got the FLOPs, but with a slight outlier from the data you provided. (I use img1 = img0.clone() instead of img1 = img0.copy() to avoid reporting the error) image

For FLOPS, this answer might be helpful. https://github.com/tngh5004/Omnistitch/issues/1#issuecomment-2319503544

DMH517 commented 2 weeks ago

I get it, thanks!