Skip to content

Conversation

@sergeyk
Copy link
Contributor

@sergeyk sergeyk commented Aug 23, 2014

This example shows how to fine-tune the BVLC-distributed CaffeNet model on a different dataset: Flickr Style, which has style category labels.
The dataset is distributed as a list of URLs with corresponding labels.
Using a script, we will download a small subset of the data, split it into train and val portinos, and use the ImageDataLayer to load images directly from the filesystem.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give the model a distinct name like StyleNet, CaffeFTFlickrStyle, or whatever.

@sergeyk sergeyk changed the title WIP [example] finetuning CaffeNet on Flickr Style data [example] finetuning CaffeNet on Flickr Style data Aug 28, 2014
@sergeyk
Copy link
Contributor Author

sergeyk commented Aug 28, 2014

@shelhamer ready for review

@shelhamer shelhamer self-assigned this Aug 28, 2014
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should snapshot to the example dir, like the other examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

disagree, i think model snapshots should be in data/ and trained models in models/ (coming up in zoo)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I only just saw this -- I would have replied here. I'm not comfortable with filing snapshots as "data" as they are models, merely intermediate ones on the way to the "final" model, which is only chosen by accepting a given validation error in most cases.

@shelhamer
Copy link
Member

Thanks for the example Sergey! A few comments on framing the merits of fine-tuning, a path issue, and suggestion for comments in the prototxt and this is ready.

@sergeyk
Copy link
Contributor Author

sergeyk commented Aug 28, 2014

disagree on paths, but rest is done

@shelhamer
Copy link
Member

Why would a model go to data? No model saves to data. Not CaffeNet from
which this finetunes, not the LeNet example, or autoencoder...

On Wednesday, August 27, 2014, Sergey Karayev notifications@github.com
wrote:

disagree on paths, but rest is done


Reply to this email directly or view it on GitHub
#970 (comment).

@shelhamer
Copy link
Member

Further this example uniquely runs from the Caffe root instead of the example's dir. Is there a reason for that choice? These choices should be uniform across examples.

@sergeyk
Copy link
Contributor Author

sergeyk commented Aug 28, 2014

I think it makes a lot more sense to run everything from caffe root than to deal with ../../ offsets in a bunch of places. I also think that examples/ should not be gitignored -- but we can gitignore examples/*.ipynb if you really want to. data/ and models/ would be gitignored.

@shelhamer
Copy link
Member

I think it makes a lot more sense to run everything from caffe root than to deal with ../../ offsets

Makes sense. We can standardize this in follow-up commits.

I also think that examples/ should not be gitignored -- but we can gitignore examples/*.ipynb

I'm open to this. Of course the choice isn't in the scope of this PR but let's talk offline.

@sergeyk
Copy link
Contributor Author

sergeyk commented Aug 28, 2014

Take my last commit as compromise

@shelhamer shelhamer force-pushed the dev branch 3 times, most recently from 4278286 to c01f07a Compare August 28, 2014 07:00
@shelhamer shelhamer mentioned this pull request Aug 28, 2014
sergeyk and others added 2 commits August 28, 2014 19:49
- further detail merits of fine-tuning: less starving for itme and data
- set random seed for reproducing the tutorial
- 1557 train / 382 test split is more indicative of training quality
  than splits of 200 images
shelhamer added a commit that referenced this pull request Aug 29, 2014
Fine-tuning tutorial: adapt CaffeNet to Flickr Style data
@shelhamer shelhamer merged commit c54c684 into BVLC:dev Aug 29, 2014
@shelhamer shelhamer deleted the dev branch August 29, 2014 05:41
@shelhamer
Copy link
Member

Thanks for the fine-tuning tutorial on a neat task Sergey!

I made a few edits to the text and expanded the fine-tuning to 2,000 images for a better indication of training progress.

@shelhamer
Copy link
Member

Fixed paths and test accuracy along with including a few details in a857001.

mitmul pushed a commit to mitmul/caffe that referenced this pull request Sep 30, 2014
Fine-tuning tutorial: adapt CaffeNet to Flickr Style data
RazvanRanca pushed a commit to RazvanRanca/caffe that referenced this pull request Nov 4, 2014
Fine-tuning tutorial: adapt CaffeNet to Flickr Style data
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

Successfully merging this pull request may close these issues.

2 participants