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

Change the CNN Model #24

Open
ahkarami opened this issue Apr 25, 2018 · 9 comments
Open

Change the CNN Model #24

ahkarami opened this issue Apr 25, 2018 · 9 comments

Comments

@ahkarami
Copy link

Dear @bilylee,
Thank you for your fantastic work.
I want to change the Base CNN model of your code via another one (e.g., ResNet50). Do you have any idea that how can I do that?

@bilylee
Copy link
Owner

bilylee commented Apr 25, 2018

Hi,

Thanks for your interest.

You can change the base network by following these steps:

  1. create the network specification file (e.g. my_embedding.py) mimicking the format of embeddings/convolutional_alexnet.py

  2. put my_embedding.py in the embeddings/ directory

  3. replace the convolutional_alexnet in siamese_model.py and inference/inference_wrapper.py with my_embedding. (Note: More sophisticated way would be following the factory design pattern and create an embedding factory, which enables selecting the embeddings by configurations.)

@ahkarami
Copy link
Author

@bilylee,
Thank you very much for your complete answer. Just as another question, have you ever try other Base CNN models? (I mean that, replacing the Base CNN model with another one (e.g., ResNet50) which trained on ImageNet will increase the accuracy of the tracker?)

@pmixer
Copy link

pmixer commented May 1, 2018

@ahkarami I tried res50, it's too slow. And VOT challenge results showed that SiamFC based on resnet could improve performance. But as mentioned by @bilylee , the performance of different checkpoints varies drastically, CNN itself may not be the most important factor for building a better tracker.

@ahkarami
Copy link
Author

ahkarami commented May 2, 2018

Dear @PeterHuang2015,
Thank you for your reply. Would you please release your modified tracker version (i.e., SiamFC with ResNet)?
You have mentioned that: CNN itself may not be the most important factor for building a better tracker, so you mean that the motion model is more important?

@pmixer
Copy link

pmixer commented May 3, 2018

@ahkarami not sure, I am still trying to enhance the tracker, personally I suggest taking a look at these papers https://arxiv.org/abs/1802.08817
https://arxiv.org/pdf/1711.01124v4.pdf

@ahkarami
Copy link
Author

ahkarami commented May 3, 2018

@PeterHuang2015,
Thank you very much for your time & response.

@pmixer
Copy link

pmixer commented May 4, 2018

@bilylee Hi bilylee, I just created a new model file in embedding folder and created a new script in experiments folder mimicking the existing files, just changed max_pooling to avg_pooling in alexnet and updated config file in experimental script in which I replaced 'convolutional_alexnet' with 'my_embedding', without modifying siamese_model.py and inference/inference_wrapper.py but it works and the validation curve and result is different from the original one.

Not sure if I was using original embedding or using the new one(with avg_pooling) as I did not obey your instructions above, could you please tell which model am I using in this way(pretty confused as I am not familiar with scared:cry:).

Regard


Checked config logs in checkpoint path, I was using original embedding file...Not sure how ex.update works. Could u please give some advice on picking up scared?(Maybe a little bit more about how you learned python and design patterns in python, really appreciate your programming skills:+1:)

@bilylee
Copy link
Owner

bilylee commented May 6, 2018

Hi,

  1. The embedding_name in the configurations currently is just a placeholder for future expansion and doesn't have any effect on the used embedding model. Therefore, you should at least modify these lines to use your custom embedding model:

return convolutional_alexnet(images, reuse=reuse)

return convolutional_alexnet(images, reuse=reuse)

  1. The easiest way to learn sacred is to read the official documentation and play with it. You can get an overview of the experiments at http://sacred.readthedocs.io/en/latest/experiment.html

  2. I learn python by constantly refining my code. The first version of this project is really messy. It took me about 6 months to polish it. With the desire to improve your code, there are plenty of resources to learn python, just google it : )

@pmixer
Copy link

pmixer commented May 6, 2018

@bilylee A heart-felt big thx!:heart:

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