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

A clear(er) workflow for arbitary data / model. #2790

Closed
kushalkafle opened this issue Jul 20, 2015 · 3 comments
Closed

A clear(er) workflow for arbitary data / model. #2790

kushalkafle opened this issue Jul 20, 2015 · 3 comments

Comments

@kushalkafle
Copy link

Hello everyone,
I'm pretty new to Caffe and path to learning Caffe has been pretty non-linear. I have done my best to find the information I want with no success. So far, I can run the examples and I can successfully modify configuration files to make it work on my own image classification problem. ( At least to the degree suggested by the first reply from this thread. [https://github.com//issues/550]. Validation and testing was also relatively easy for existing networks or pre-trained models.

But even after following the rest of that thread and links [https://github.com//pull/691] and other methods of creating the hdf5 data (both in python and MATLAB), I am unable to figure out a way to train my own network mainly due to lack of understanding about how the pieces sit together.

Could I request a very top level workflow for a arbitrary data, be in an image or a feature vector of other kind? Specifically, I think it will be helpful for a lot of beginner to address following questions.

  1. How to you design your own network? Both convolutional and simple NNs. Say something simple like a single hidden layer with m input and n output layer with k hidden layers. A sample protext file with comments could be incredibly helpful. (Incidentally, is caffe a good place for non-convolutional networks? If not what would you suggest that is not as painfully slow as MATLAB)
  2. How are the layers organized in the pre-trained network? And how do you access the output from arbitrary layer (So, that I can use something like using (last-1)th layer from a pre-trained model, say, trained on imagenet, as a feature vector plus some of my own. This is relatively easy to do on matconvnet.
  3. Given an arbitrary feature vector (e.g from above) plus more 'features' from elsewhere what do I need to do to make my network work with that data? I understand that my best bet is to convert to hdf5 and use hdf5 layer in caffe but I am unsure what that means. Specifically, what structure should my data have and how hdf5 data layer sits with a network that I can design?

In a nutshell, A top-level workflow for a task like the following could be very helpful to get a good feel for the workflow in using caffe for research.

  1. Get output from (last-1)th layer of alexnet (or similar) to serve as a feature vector. (with 1000 dimensional output vector). The data is no longer an image from this point forth.
  2. Convert that training data to suitable format (leveldb?? hdf5??) possibly augmenting with some of my own stuff.
  3. Create a custom neural net (convolutional or otherwise) and train it on the above created training and testing data.
  4. Perform validations and test it.

Thank you.
edit: Some clarifications

@longjon
Copy link
Contributor

longjon commented Jul 23, 2015

It would be great to have more thorough tutorial documentation, and we're happy to receive PRs for or link to such things.

If you're looking for someone to answer these questions, caffe-users is the right venue for that; this tracker is for specific issues and bugs.

@longjon longjon closed this as completed Jul 23, 2015
@surjithbs17
Copy link

@kushalkafle Even I am looking for some example which is not using the image dataset. If you have any example, post it as a reply for this.

Thanks.

@kushalkafle
Copy link
Author

I created this post at a time when I had very little understanding of both caffe and github etiquette. Like @longjon said, this is not the forum to ask for help but report and track bugs and errors. You should search on caffe-users google groups.

That being said, I'll try to outline some resources and tips to get you started. Both caffe examples and support for python bindings have improved significantly since the time I made this post. First thing you want to do is carefully go through examples (ipython notebooks) in examples folder. You can open them in the browser or an ipython notebook in your own computer. Specifically go over this and this. Second example goes through creation of hdf5 dataset (non-image) and classifying it.

Hopefully, that will get you started. It does take some time to get used to things in caffe. Good Luck !

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

3 participants