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

All-in-one Jupyter notebook for Caltech dataset #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MasoodK
Copy link

@MasoodK MasoodK commented Jul 23, 2017

A Jupyter notebook including the main files needed to train the VGG model on Caltech256 dataset. Notebook includes code updates (TF v1.2) and documentation, among others.

A Jupyter notebook including the main files needed to train the VGG model on Caltech256 dataset. Notebook includes code updates (TF v1.2) and documentation, among others.
@taylorty
Copy link

taylorty commented Nov 7, 2017

Hi, First thank you so much for creating this. It was really helpful. I tried to run the last part of the code on my customized dataset where it should generate the CAM images. But it seems to run forever to generate the images. Do you have any idea about why it occurs? Thank you.

@MasoodK
Copy link
Author

MasoodK commented Nov 7, 2017

@taylorty , glad you found the notebook useful. Not sure, however, I understand what your specific issue is. You will need to reproduce the whole A-Z of the process/cells in your environment. If that checks out, then you can proceed to adapt the model to your own dataset. By adapting, I mean doing at least some training before going to prediction, so that the model is correctly tuned to the number of labels, etc., in your set. To help you debug along the way, you can use simple Print statements to check things, or move to Python or TensorFlow debug tools if needed. Hope this helps :)

@taylorty
Copy link

taylorty commented Nov 7, 2017

@MasoodK I just figured out what was the problem. Adding %matplotlib inline before plotting makes everything work as expected.

@Rahul-Venugopal
Copy link

Hi ,
Thanks for your effort and the notebook was really helpful . May I Know whether a trained model is available which I can use to test on caltech256 dataset ?

@Rahul-Venugopal
Copy link

@MasoodK @jazzsaxmafia I am running the jupyter notebook code and when I run the cell for training I get the following error :

TypeError Traceback (most recent call last)
in
15 labels_tf = tf.placeholder( tf.int64, [None], name='labels')
16
---> 17 detector = Detector(weight_path, n_labels)
18
19 p1,p2,p3,p4,conv5, conv6, gap, output = detector.inference(images_tf)

in init(self, weight_file_path, n_labels)
5
6 with open(weight_file_path) as f:
----> 7 self.pretrained_weights = cPickle.load(f)
8
9 def get_weight( self, layer_name):

TypeError: a bytes-like object is required, not 'str'

Can anyone help me to understand the mistake I am making ?

@MasoodK
Copy link
Author

MasoodK commented Jan 6, 2019

Hi ,
Thanks for your effort and the notebook was really helpful . May I Know whether a trained model is available which I can use to test on caltech256 dataset ?

@Rahul-Venugopal
The link to the Caffe model is already provided by the repo owner; you'd download that file. The code/notebook loads that up and starts the fine-tuning.

Regarding your 2nd comment: you gotta have basic Python debugging skills to have a crack at this. Not sure what your issue is; looks like you've indicated a wrong path to the model file or sth similar.

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.

3 participants