gpleiss / efficient_densenet_pytorch

A memory-efficient implementation of DenseNets
MIT License
1.52k stars 327 forks source link

pretrained densenet169 weights #40

Open Kexiii opened 6 years ago

Kexiii commented 6 years ago

Hi, thanks for your great work! I'm working on densenet169 these days, do you know where I can find the ImageNet pretrained weights for this efficient implementation? Or do you have any example code to show how to convert the other implementation's pretrained model to this one? I do have noticed this #13 , but it seems @ZhengRui didn't provide any example code, and I don't know where to start..

gpleiss commented 6 years ago

I think you should be able to use any of the PyTorch pretrained DenseNets:

model_urls = {
    'densenet121': 'https://download.pytorch.org/models/densenet121-a639ec97.pth',
    'densenet169': 'https://download.pytorch.org/models/densenet169-b2777c0a.pth',
    'densenet201': 'https://download.pytorch.org/models/densenet201-c1103571.pth',
    'densenet161': 'https://download.pytorch.org/models/densenet161-8d451a50.pth',
}

Those urls should have the weights. Let me know if this works!

Kexiii commented 6 years ago

Thanks for your reply! I forgot to mention that I'm using the old pytorch0.3 implementation and it can't directly use the pretrained weights you provided.

gpleiss commented 6 years ago

Did you try the ones here: https://github.com/mingminzhen/densenet-efficient-model

Kexiii commented 6 years ago

Yes, but it is based on the pretrained memory efficient torch model(232,264): https://github.com/liuzhuang13/DenseNet In the tech report, they didn't provide efficient densenet169 pretrained torch model that I want

gpleiss commented 6 years ago

Try converting the pytorch model then. All you have to do is change the name of the keys in the state duct in the link that I supplied. That’s how we created the other efficient densenets.

Best, Geoff

On May 23, 2018, 10:55 PM -0400, Kexiii notifications@github.com, wrote:

Yes, but it is based on the pretrained memory efficient torch model(232,264): https://github.com/liuzhuang13/DenseNet In the tech report, they didn't provide efficient densenet169 pretrained torch model that I want — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Kexiii commented 6 years ago

Thanks for your advice, want to let you know I've tried to convert the densenet169:https://github.com/Kexiii/Pretrained-Efficient-DenseNet

ZZXin commented 4 years ago

I think you should be able to use any of the PyTorch pretrained DenseNets:

model_urls = {
    'densenet121': 'https://download.pytorch.org/models/densenet121-a639ec97.pth',
    'densenet169': 'https://download.pytorch.org/models/densenet169-b2777c0a.pth',
    'densenet201': 'https://download.pytorch.org/models/densenet201-c1103571.pth',
    'densenet161': 'https://download.pytorch.org/models/densenet161-8d451a50.pth',
}

Those urls should have the weights. Let me know if this works!

Hi, I have a question On which dataset these weights are pretrained,ImageNet?

gpleiss commented 4 years ago

Yup. Imagenet.