Git Product home page Git Product logo

efficient-ai-backbones's People

Contributors

gaffey avatar ggjy avatar iamhankai avatar liu-zhenhua avatar yehuitang avatar yitongh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

efficient-ai-backbones's Issues

GhostNet architecture

Hi,

According to the paper, you follow MobileNetV3 and replace bottleneck with G-bottleneck.
However, from the code, I think GhostNet is architecturally different from MobileNetV3.

For example, there is a layer in GhostNet with 48 #exp and 24 #out, which I couldn't find in MobileNetV3. Also, for the last few layers, MobileNetV3 has two 960 #exp and 160 #out layers but GhostNet has four of them. Moreover, in MobileNetV3 there are two 120 #exp and 40 #out layers while GhostNet only has one.

Can you explain why is this the case? How do you come up with this final architecture?
Have you tried directly replacing all the bottlenecks in MobileNetV3 to Ghost module without altering the base architecture?

Thanks,
Rudy

Any change to release the code for Object Detection task

First of all, thanks for the great work.
This is related to #15 and #17
On section 4.2.2, this paper demostrates Ghostnet's briliant ability of computation cost reduce in object detection task. Unfortunely, there seems no related code in the repostory. It would be great if you can release it in the near future.

Bloated model

Hi,
I am using Ghostnet backbone for training YoloV3 model in Tensorflow, but I am getting a bloated model. The checkpoint data size is approx. 68MB, but the checkpoint given here is of approx 20MB https://github.com/huawei-noah/ghostnet/blob/master/tensorflow/models/ghostnet_checkpoint.data-00000-of-00001

I am also training EfficientNet model with YoloV3 and that seems to be working fine, without any bloated size.

Could anyone or the author please confirm if this is the correct architecture or anything seems weird?
I have attached the Ghostnet architecture file out of the code.

Thanks.
ghostnet_model_arch.txt

No speed up after using GhostModule!!

Thanks you guys' work a lot firstly.
I replaced the BasicBlock in ResNet18 with the GhostModule,but the inference processs cost more time after using it with GPU.It worked as the paper shows with CPU. Is this reasonable??

How does the Ghostnet train?

Hello, how does the Ghostnet train? Can you provide the source code for the training model? Will you open the training code in future?

关于对线性变换的一些问题

作者您好,首先恭喜这篇工作中了CVPR
我对Ghost模块的理解是,先对原始特征图A做常规的卷积得到特征图B,再对特征图B做分组卷积得到其他特征图C,最后特征图B,C concat到一起进入到下一层
我想的是您文中说的这部分是个线性变换,但是您还是在对特征图B分组卷积后进行了一次Relu激活,加入激活函数不就是打破了线性吗,这不应该是一个线性变换。
望作者能解答一下

Is there detection code?

I saw that there was detection results on the paper.

For the proper re-production of detection results, I'd like to refer your code... but seems not included in this repository.

Is there any other repository for the detection? or not available?

Replace Conv2d in my network, however it becomes slower, why?

Above all, thanks for your great work! It really inspires me a lot! But now I have a question.

I replace all the Conv2d operations in my network except the final ones, the model parameters really becomes much more less.
However, when testing, I found that the average forward time decreases a lot by the replacement (from 428FPS down to 354FPS).
So, is this a normal phenomenon? Or is this because of the concat operation?

ghostnet is more efficient for object detection?

论文的实验结果中,ghostnet在分类任务中用和mobilenetv3相当的FLOPs做到几乎同样的准确率,而在检测任务中用更加少的FLOPs就可以做到和mobilenetv3同样的准确率。请问这个现象怎么解释?

分类:

Model FLOPs Top-1 Acc (%)
MobileNetV3 Large 1.0× 219 75.2
GhostNet 1.3× 226 75.7

检测:

Backbone Detection Framework Backbone FLOPs mAP
MobileNetV3 1.0× Faster R-CNN 219M 26.9%
GhostNet 1.1× Faster R-CNN 164M 26.9%

some questions about the network structure?

Hi! Thank you for your codes!
There are some differences in your code. In your paper, after AvgPooling, the features maps go through a conv1x1 and a fc layer to output the result, but in your pytorch version, the feature maps go through two fc layers, and in your tensorflow version, the feature maps seems to go through two conv1x1(fully convolution network), which one can produce the highest accuracy and reach the accuracy written in your paper?
Thank you!

Can more pretrained model(TF) be released?

I find that in this repo, there is only a pretrained TF model with width ratio 1. Can more pretrained models with diverse width ratio(such as 0.75, 0.5, etc..) to be provided?
Thanks.

#将ghostnet训练place365分类效果不够理想的问题#

@iamhankai 您好,我尝试了将ghostnet网络在place365数据集上进行微调,在迭代了100个epoch之后,Acc@1: 35.% ,Acc@5: 62.%。
部分超参数设置如下:
batch_size = 256;
loss: CrossEntropyLoss();
optimizer: SGD();
lr_init=0.1 & Sets the learning rate to the initial LR decayed by 10 every 30 epochs

先只对最后的classifier训练,后面又对整个网络进行了训练,得到的两者的结果都很相近。
请问您能给一些在place365数据集上训练时的建议和帮助吗?
非常感谢!

How to use it?

我已经下载了这个文档,但是不知道怎么用,还有就是那个pytorch版本为什么比这个tensorflow版本内容少那么多,刚入门不太懂,这个文档下载下来以后可以做一些迁移学习吗?刚入门的同学能用明白吗?

Can I receive the pretrained ghostnet model with width ratio 1.3

Hello,

As per the paper, the validation accuracy on imagenet dataset of ghostnet is higher than mobilenet-v3 (75.7%). However, the actual experiment accuracy from this repo is 74% (lower than mobilenet-v3) .
The model ghostnet implemented at this repo is for width_ratio 1.0. Can I receive the pretrained ghostnet model with width ratio 1.3 (ghostnet 1.3x has 75.7% accuracy as per the paper)

About the training cost

Hi, thanks for sharing such interesting work,

I find the proper inference information (e.g., FLOPs and Params) in the paper, and am wondering about the training cost instead, could you share the training cost comparison with other CNN architectures, like MobileNet-V3 structure you follow?

How can I get same performance as in paper when applying GhostModule on ResNet-50?

Hi, very thanks for your working, @iamhankai

I'm interested in this GhostModule design, so I substitude the GhostModule in ghostnet for vanilla convolution in ResNet-50. With s=2, paper shows distinguished performance as 75.0% Top1-Acc and 2.2G FLOPs. But I trained this model only to gain a 73.7% Top1-Acc and 2.4G FLOPs. Could you give me relevant training setting file or remind me of some special training details? Thanks again!

Is there a ghostnet caffe model?

Is there a ghostnet caffe model?

converted to darknet2caffe but not working properly in nnie 3519a,3559a.

What should I do if I want to test ghostnet or tinynet in 3519a or 3559a?

Pretrained model can't be loaded?

what's the version of your Pytorch? when I load the pretrained model,it will exits error:
_pickle.UnpicklingError: invalid load key, '
'.

EfficientNet-B0 performance do not matched its original paper

Hi, cheers for your amazing art!

I noticed that EfficientNet-B0 seems to have accuracy higher than 77%, but only about 76.3% according to Figure 6.
I wonder what causes this difference, is that the EfficientNet result could't be reproducible?

efficientnet benchmark

ghostnet fig6

thanks for your kindly guidance.

why video memory increase

Excuse me, why I used your GhostModule, but the video memory increased. I simply experimented, turning a channel number of 64 into a channel number of 128 through convolution, and the program showed increased video memory. Is the number of channels too small to fit, or the number of ghostmodules is not enough, thank you for your answer.

Actual Inference Speed

What kind of ARM-based mobile phone you use testing the actual inference speed and the model runned on CPU or GPU?

读论文和程序遇到的一些疑惑。期待您的解惑,谢谢。

您好,最近我读完这篇论文,我想请教几个问题1.程序中使用Ghost Bottleneck完成标准卷积和廉价变换。文中说Ghost module就可以完成(是在程序中一个Ghost Module第一卷积是标准卷积,第二卷积中去掉激活函数么)。2.程序中的恒等变换指的是满足条件的shortcut么。期待您的解惑,谢谢。

The question of formula (5) in the thesis

Formula (5) is as follows:
image
I think there is an error in the calculation of the parameters of the depth separable convolution part of the denominator. The correct formula should be as follows:
image

MAC and parameter count on Ghostnet

I have tried to implement Ghostnet myself on Tensorflow and I get about 3.7M parameters and about 138M MAC. Can you confirm that I should expect 5.2M parameters and 141M MAC?

Faster R-CNN use GhostNet

I replaced the backbone network of Faster R-CNN with GhostNet and modified the structure of GhostNet, so I did not use the pre-training file you provided. This makes my model fail to converge. Can you share your experience in setting the hyperparameters? thank you

#寻求帮助#如何提升ghostnet在place365数据集上的效果问题?

@iamhankai 您好,我尝试了将ghostnet网络在place365数据集上进行微调,在迭代了100个epoch之后,Acc@1: 35.% ,Acc@5: 62.%。
部分超参数设置如下:
batch_size = 256;
loss: CrossEntropyLoss();
optimizer: SGD();
lr_init=0.1 & Sets the learning rate to the initial LR decayed by 10 every 30 epochs

先只对最后的classifier训练,后面又对整个网络进行了训练,得到的两者的结果都很相近。
请问您能给一些在place365数据集上训练时的建议和帮助吗?
非常感谢!

ratio is always 1,the stride slice do nothing

after train by myself,I convert to tflite。found the strideslice don‘t change the channel,then I found in the Ghostmodel channel_mult is always equal ratio-1(2-1=1),so filters-init_channels=0.the strideslice is useless

kernel size in GhostModule

Good Work! Thanks for sharing.
Why is the kernel size in primary_conv 1 and this in cheap_operation 3(dw) ? If you have tried setting the kernel size in primary 3 and in cheap_operation 1(dw)? It seems that the latter has less FLOPs. (Although I guess this adjustment may lead to worse behavier.)

On the method of feature visualization

Thank you for the open source code. Here I would like to ask what method is used to visualize the feature map in figure 1 of the paper. I look forward to your reply!

GhostNet is way much slower than mobilenetV1?

When I test Ghostnet (drop all SE-modules) and mobilenetv1 on caffe and TensorRT, it shows that Ghostnet is 2 times slower than mobilenet. Is it because there are too many convs in ghostnet model?

idea similar to dense-net?

To my understanding, suppose input feature map with shape (C, H, W),
for ordinary convolution:
output shape: (D, H, W), here suppose output D channels

while for ghost op, suppose ratio=2:
1. first, with ordinary convolution, input (C, H, W), output (D / 2, H, W),
2. second, still with ordinary convolution, input (D / 2, H, W), output (D / 2, H, W)
3. concatenate the above 2 output, then get final output (D, H, W)
here omit batch normalization, relu etc. for simplicity. The above three ops final reach almost the same effect with Densenet, though the motivation is different.

Please correct me if I have any misunderstanding.

kernel size in primary convolution of Ghost module

Hi,
It is said in your paper that the primary convolution in Ghost module can have customized kernel
size
, which is a major difference from existing efficient convolution schemes. However, it seems that in this code all the kernel size of primary convolution in Ghost module are set to [1, 1], and the kernel set in _CONV_DEFS_0 are only used in blocks of stride=2. Is it set intentionally?

How can I get same performance as in paper when applying GhostModule on ResNet-50?

Hi, very thanks for your working, @iamhankai

I'm interested in this GhostModule design, so I substitude the GhostModule in ghostnet for vanilla convolution in ResNet-50. With s=2, paper shows distinguished performance as 75.0% Top1-Acc and 2.2G FLOPs. But I trained this model only to gain a 73.7% Top1-Acc and 2.4G FLOPs. That makes me very upset. Could you give me relevant training setting file or remind me of some special training details? Thanks again!

resnet50 + ghost module

ghostnet在 resnet50中的那个实验,是怎么把ghost module结合进去的呀,cheap conv用的是depth conv吗

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.