-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot download backbone weights #48
Comments
the original author changed the url. https://github.com/lukemelas/EfficientNet-PyTorch/releases |
there are keyword mismatches between the pretrained model weights and the param name in the network definition. p = r'D:\ExternProjects\efficientnet-b2-8bb594d6.pth'
state_dict = torch.load(p)
for key in state_dict.keys():
print(key) I get
However, the param names inside the model by the following code model = effnet_model.EfficientNet.from_name('efficientnet-b2')
for k, v in model.named_parameters():
print(k)
we can see an additional the pytorch version I use is 1.3.1 |
I use different conv now, so loading it directly is not possible. |
@zylo117 you mean now we now have to train without effcientnet weights? |
As a work around, you can just load the final weights, then save the backbone weights |
Alternatively, use https://github.com/rwightman/pytorch-image-models. That repo has every single imagenet classifier known to man, including every single efficientnet model you can imagine, in different flavours, trained with different repositories, including NoisyStudent from tensorflow ported to pytorch. All the weights are provided. You just need to do a bit of hacking for it to work if you want to use the pretrained weights for efficientdet in this repo. If you don't care about using the provided weights and just train efficientdet from scratch on coco, then there is little hacking required. |
Actually I want to train efficientdet from initial efficientnet weights. |
Hi, Thank you. |
I've used https://github.com/rwightman/pytorch-image-models for the backbone. |
I'll try! Thank you so much! |
I put the backbone and bifpn of the repo into mmdetection for training, arch is efficientdet d2 |
Yeah EffcientDet is super slow to train. I'm running some experiments with CIOU loss. That seems to help. But there is some hyper parameter tuning required, namely loss gains. |
https://github.com/rwightman/pytorch-image-models has a better efficientnet implementation, we can obtain the feature layers that should be fed to bifpn much more easily efficientdet paper mislead us by using p3 to p7 features from efficientnet, that's one reason why many third party implementation can only obtain poor mAP |
are you serious? it really is p3 to p7. |
I'm using https://github.com/rwightman/pytorch-image-models to minimise code and to experiment with training. With regards to using output features from the backbone I'm mimicking what this repo does |
I am serious See the feature map size of efficienet b2 in https://github.com/rwightman/pytorch-image-models actually, only stage 2 4 and 6 are used to build bifpn, see https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch/blob/master/efficientdet/model.py#L55 |
I know that, I wrote that part in bifpn. That part of the paper seems misleading alright. But in the official impl, they actually modify the efficientnet before bifpn so that there really are p6 and p7 in efficientnet. |
google does evil this time, in the latest revision of this paper, the author has not clarified the correct way of building p3 to p7. |
backbone weights listed at the end of this file cannot be download
https://github.com/zylo117/Yet-Another-EfficientDet-Pytorch/blob/master/efficientnet/utils.py
The text was updated successfully, but these errors were encountered: