GithubHelp home page GithubHelp logo

Comments (8)

cfzd avatar cfzd commented on July 20, 2024

@Lewis0427
根据我们的经验,分辨率不会影响结果,因为对于不同大小的分辨率,我们提取频率的时候总会在一个固定的7x7频谱上进行提取,相关的代码可以参看这个地方:

FcaNet/model/layer.py

Lines 38 to 39 in aa5fb63

mapper_x = [temp_x * (dct_h // 7) for temp_x in mapper_x]
mapper_y = [temp_y * (dct_w // 7) for temp_y in mapper_y]

上述代码的想法很简单,假设输入为n x n,那么其总共有n x n个频谱。但其实在一张14x14的特征图上的(2,2)频率分量他的绝对频率是和一张7x7的特征图上的(1,1)分量是一致的。因此我们为了保证不同stage(也即不同分辨率)的频率都是一致的,我们做了这样的归一化,这就导致分辨率不会影响结果。即使在COCO这种本身图像大小不一的数据集上也能work。

我们设置这个c2wh主要还是为了在固定分辨率和网络结构的情况下(一般是分类网络),提前确定好大小并预先生成对应频谱的DCT 权重,而不用每次都resize,这样应该会快一点。

from fcanet.

cfzd avatar cfzd commented on July 20, 2024

@Lewis0427
如果你的尺寸可以确定的话,那你完全可以按照你的尺寸去修改c2wh, 这样还可以省去adaptive_avg_pool2d

from fcanet.

Lewis0427 avatar Lewis0427 commented on July 20, 2024

@Lewis0427 如果你的尺寸可以确定的话,那你完全可以按照你的尺寸去修改c2wh, 这样还可以省去adaptive_avg_pool2d

我不是7的倍数的尺寸写到c2wh中,不会影响吗?还请赐教

from fcanet.

cfzd avatar cfzd commented on July 20, 2024

@Lewis0427
不会影响,这个其实和分辨率大小没什么关系。

from fcanet.

Lewis0427 avatar Lewis0427 commented on July 20, 2024

万分感谢您!

from fcanet.

CaptainPrice12 avatar CaptainPrice12 commented on July 20, 2024

你好,感谢你的分享!其实我关于c2wh setting那里有一些疑问。我看大多数类似的提问是关于如果feature size不是正好7X7这样的话c2wh该怎么设置。我看你的回复是adaptive_avg_pool2d那里做resize应该不会影响性能。不过那些问题都是基于feature map的H和W相等的情况。如果我的feature size的W和H不相等,比如input size是200X80这个大小的,如果最后的feature map size是25X8这样的话,DCT那里继续做adaptive_avg_pool2d的resize是否会影响最后的结果呢?顺便问下对于input size是变化的的情况(不同batch的input size不同),FCA的resize这个效果如何呢?谢谢!

from fcanet.

cfzd avatar cfzd commented on July 20, 2024

@CaptainPrice12
即使宽和高不一样,也是一样的,我们在COCO上的实验不仅宽高不一样,输入分辨率还会变化,这样我们的方法依然能够很好的工作。

from fcanet.

CaptainPrice12 avatar CaptainPrice12 commented on July 20, 2024

@cfzd 感谢你的回复!其实对channel分组我还有个疑问。如果不对channel做split成n组,而是每个DCT filter都对所有的channel做一次运算的话,就像issue#14讨论过的https://github.com/cfzd/FcaNet/issues/14, 这么做的话运算量确实会大一些,效果会怎么样呢?如果不同的DCT filter对每个channel都做运算的话,是不是最终应该对每个channel上不同DCT filter(e.g., top16)的运算结果再求一次平均从而得到最后这个channel的结果呢?

from fcanet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.