-
Notifications
You must be signed in to change notification settings - Fork 92
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
Changes to made for more than 5 classes #9
Comments
1、pluginImplement.cpp reshape layer |
@Ghustwb , extremely Sorry for the late reply. I tried changing following things, but still getting error:- then i clean, cmake, make. when i run the command './build/bin/mobileNet' , i get following error-
I also saw this line in pluginImplement.h line number 167, 168 - Do i need to make any change in above line 167, 168 in pluginImplement.h? what is 8732 and 1917? so i need to change that? |
@Ghustwb Please help |
Sorry for the late reply //cudaSoftmax( 8732 *21, 21, (float *) *inputs, static_cast<float *>(*outputs));
cudaSoftmax( 1917 *5, 5, (float *) *inputs, static_cast<float *>(*outputs)); In SSD,the backbone is VGG16,Conv4_3 (38*38)can get 4 boxes of different widths and heights,Conv7 (19*19) get 6 boxes,Conv8_2 and Conv9_2 get 6 boxes,Conv 10_2 and Conv11_2 get 4 boxes. So,
In MobileNet-SSD,the backbone is mobileNet,so the number of boxes is different with SSD. If you use 2 classes, you should chage it cudaSoftmax( 1917 *2, 2, (float *) *inputs, static_cast<float *>(*outputs)); |
Thanks @Ghustwb , Finally figured out. Actually it was simple, but took a lot of time to figure it out. For changing classes from 5 to our custom number of classes make changes in following files: (custom number of classes mentioned here is including background) In pluginImplement.cpp: In pluginImplement.h: In MobileNetSSD_deploy_iplugin.prototxt: 650 - 15 to n * 3 example, below is for changing 5(including background) classes to 3(including background) 650 - 15 to 9 Thanks |
@PiyalGeorge just make changes in these files? Need to retrain? |
Hi @xiongdahua555 , the caffemodel(Mobilenet-ssd) in this repo by Ghustwb is having 5 classes. if you have a custom class trained with similar number of classes, just replace Ghustwb's model with that. and do make changes in above files. Also i got an error when tried the same with 21 classes model(Maybe more changes might be needed, but i didn't checked into that since i already got results with 3). When i tried with 3 classes the above changes gave successful results. Thank you |
Thanks @Ghustwb for this repo. Finally it worked. I trained a model in with 5 classes and it worked. But how to make it work for 7 classes? I mean where all we have to make changes?
The text was updated successfully, but these errors were encountered: