Skip to content
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

DenseNet on ImageNet #7

Open
AlexandreBriot opened this issue Oct 14, 2016 · 20 comments
Open

DenseNet on ImageNet #7

AlexandreBriot opened this issue Oct 14, 2016 · 20 comments

Comments

@AlexandreBriot
Copy link

I've just read your paper which is really interesting.
I was wondering whether you tried learning a DenseNet version on ImageNet ?
Thank you

@liuzhuang13
Copy link
Owner

liuzhuang13 commented Oct 14, 2016

Thanks for your interest in DenseNet.

We are experimenting on ImageNet with different model sizes. Right now we have some preliminary results (relatively small models), which is shown in the figures below.

11 pic_hd
12 pic_hd

As shown in the figure, DenseNet with the same amount of parameters or computation cost(measured in #flops) as ResNet has lower validation error. The DenseNets in the figures have growthrate = 32. The error of ResNet is copied from results reported by fb.resnet.torch. All the hyperparameters are also kept the same as theirs. When all the models are finished we'll update the paper and Readme with ImageNet results.

The DenseNet architecture used in ImageNet is different from what we used in CIFAR and SVHN dataset. The differences are listed below:

  1. The major difference is we used "bottleneck structure", which is inspired by the ResNet paper. In each layer, before producing new feature maps through 33 convolution on previous layers' feature maps, a 11 convolution with output size 4*growthRate is performed.
  2. In transition layers we halved the number of feature maps.
  3. Following the design strategy of ResNet on ImageNet, we use 4 dense blocks, and they have different depths.

@AlexandreBriot
Copy link
Author

Thanks for your answer.
That sounds very promising !

@baiyancheng20
Copy link

Great results.
When will you release the prototxt file for imagenet?

@liuzhuang13
Copy link
Owner

liuzhuang13 commented Oct 23, 2016

@baiyancheng20 sorry this is trained using torch. If you want to use them we can give you torch model definitions first (or pre-trained models later).

Model definition here:
densenet-imagenet.txt

After we get the full results we'll include imagenet models in both Torch and caffe repos.

@baiyancheng20
Copy link

@liuzhuang13 Thank you for sharing the code. Densenet is a very interesting work. I will try to use the code for Cifar to train on Imagenet Dataset. Thanks a lot.

@liuzhuang13
Copy link
Owner

@baiyancheng20 Thanks for your interest. In order to get better performance, you may want to adapt the caffe code for CIFAR a little bit according to the differences I listed above. For more detail you can refer to the torch code.

@livenletdie
Copy link

Model definition here:
densenet-imagenet.txt

The network model in the 'densenet-imagenet.txt' seems to be different from the paper. In the paper, DenseNet 169 has four dense blocks of size {6, 12, 32, 32} but the file has {6, 12, 48, 16}. Does that make a big difference? I am trying to train the network for Imagenet but convergence curve after the first 32 epochs does not look great (I am using fb.resnet.torch setup and just specified this network type via the -netType).

Thanks
Ganesh

@liuzhuang13
Copy link
Owner

Sorry, the file was wrong, it was probably an older version. I'll correct it. Sorry but I couldn't remember whether this would make a big difference.

Also, there was pretrained models available in the readme page, in case your purpose is just to use a pretrained model.

@livenletdie
Copy link

Thanks for the reply. No problem at all -- just wanted to confirm.

Thank you for uploading the pre-trained models. They have been very helpful but I did want to train a model for a different study I was doing.

@karaszka
Copy link

Hi! I'm trying to train DenseNet-121-BC on the ImageNet (my own implementation) and I am just wondering weather the training curves I'm getting are any close to what it looked like for you. It would be great if you could share some of them for comparison or give me your opinion on mine results.

image
selection_017

In this setup one epoch lasts for roughly 25.6k iterations, so above you can see around 10 epochs (I'm using just one GPU for trining), those are the params that I'm using:

selection_021
selection_022

Thanks!

@livenletdie
Copy link

Yes it would be great if the authors could post their convergence curves -- I tried to train with fb.resnet.torch repo where I just replace netType to DenseNet but my initial training curve looked weird. It would helpful if I had a curve to compare to so that I will know if it is expected or I am doing something wrong. Thanks in advance for the help!

@nihalgoalla
Copy link

Could you post the prototxt files used for training DenseNet's in caffe?

It would be great to check and make some changes to it to experiment.

@liuzhuang13
Copy link
Owner

Hi, @nihalgoalla please check https://github.com/liuzhuang13/DenseNetCaffe (for CIFAR, without BC structure) and https://github.com/shicai/DenseNet-Caffe (for ImageNet).

@nihalgoalla
Copy link

nihalgoalla commented Mar 7, 2017 via email

@liuzhuang13
Copy link
Owner

@nihalgoalla At https://github.com/liuzhuang13/DenseNetCaffe, we have a solver prototxt file (for CIFAR training) and an example prototxt file that contains the last layers. Thanks

@pyaf
Copy link

pyaf commented Jan 25, 2018

@liuzhuang13 Did you scale the ImageNet images to [0,1] before feeding to DenseNet?

@zakirbd
Copy link

zakirbd commented Jul 10, 2018

Hi,
I tried to extract image features using DenseNet-121 which is pre-trained (ImageNet). What would be the shape of the output features?

@JieMEI1994
Copy link

Hi @liuzhuang13, thanks for your great work in dense net.
Comparing to resnet, I wonder why you choose concatenate but not the add function in original resnet.
hope to hear you soon.

@liuzhuang13
Copy link
Owner

Hi @JieMEI1994, I think this is discussed in the section 5 of the paper.

@guotong1988
Copy link

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants