Comments (11)
Oh thank you very much! @PiyalGeorge
from mobilenet-yolo.
mobilenet_yolov3_lite_deploy.prototxt was made from merge_bn.py , you can't use it directly.
I suggest you can try modify test.prototxt to deploy.prototxt first (replace data layer and remove eval. layer)
from mobilenet-yolo.
Thanks @eric612 , I'll try that.
Also while training, do i need to change 'num_class', or 'num' anywhere in mobilenet_yolov3_lite_train.prototxt or in test.prototxt based on number of classes i'm training? (Cuz usually we do it right?)
In the last lines -
yolov3_param {
side: 26
num_class: 20
num: 3
......
}
from mobilenet-yolo.
See issue #12
from mobilenet-yolo.
Hi, @eric612 , Thanks for this amazing repo. Your mobilenet-yolov3-lite model is giving good results with good fps.
Currently following your repo, i'm trying to do training on mobilenet-yolov3-lite with my custom dataset. I'm having 6 classes(including background), 50000 images converted to LMDB. I'm using train_yolov3_lite.sh for training. I modified mobilenet_yolov3_lite_train.prototxt, label_prototxt, LMDB and batch_size in here. My system allows a batch size of only 2 for training and 1 for testing(total 3). I have trained till 50000 iterations. I modified the classes in yolo_detect.cpp , make file, etc. then modified the demo_yolo_lite.sh for the new model. but it caused some convolution 'bias_term' issue in mobilenet_yolov3_lite_deploy.prototxt . Hence modified that deploy file also. After rectifying all these, when i try to run the model, it still doesn't give output, no errors. Can you help me resolve this?
Hi,
Have you solved this problem? Now I'm training on my own dataset and I'm facing the same problem with you. Can you help me resolve this?
Thanks
from mobilenet-yolo.
Hi @eric612 , Extremely sorry for late reply. Thanks alot, your above mentioned methods worked perfectly for custom training and detection. Thanks 😊 😃
from mobilenet-yolo.
Hi @globalmaster , Sorry for the late reply.
Actually all your answers is mentioned by @eric612 , in the above comments. Anyway i'll join all comments and here is what you want:
Hope you have LMDB database of custom dataset with specific classes. I'll explain how i've done with 5 classes(excluding background). For example i have 5 classes(person, dog, cat, car, bus).
In mobilenet_yolov3_lite_train.prototxt, modify:
- lmdb file path
- label_map.prototxt
- Modify 'num_output: 75' in the file as follows:-
the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
So if you have 5 classes(for eg:- person, dog, cat, car, bus), then the value is (5+5)*3=30, so modify 'num_output: 75' in file to 'num_output: 30'. - Search for 'num_class: 20' in the file and modify the value as follows:-
if you have 5 classes(for eg:- person, dog, cat, car, bus), then modify the value into 'num_class: 5'
In mobilenet_yolov3_lite_test.prototxt, modify:
- lmdb file path
- label_map.prototxt
- Modify 'num_output: 75' in the file as follows:-
the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
So if you have 5 classes(for eg:- person, dog, cat, car, bus), then the value is (5+5)*3=30, so modify 'num_output: 75' in file to 'num_output: 30'. - Modify 'num_classes: 20' to 'num_classes: 5'
- Modify 'num_classes: 21' to 'num_classes: 6'
Once Training is done:
Modify the MobileNet-YOLO/examples/yolo/yolo_detect.cpp. You need to modify line:
char* CLASSES[21] = { "background", ....., "train", "tvmonitor" };
with classes.
Then once again run make commands:
cd build
cmake ..
make -j4
make pycaffe
Now modify MobileNet-YOLO/demo_yolo_lite.sh . Just now the eric has uploaded new mobilenet_yolov3_lite_deploy.prototxt , https://github.com/eric612/MobileNet-YOLO/blob/master/models/yolov3/mobilenet_yolov3_lite_bn_deploy.prototxt .
In mobilenet_yolov3_lite_bn_deploy.prototxt, modify:-
- Modify 'num_output: 75' in file to 'num_output: 30' following above same criterias
- Modify 'num_classes: 20' to 'num_classes: 5'
Now go ahead and run the command bash demo_yolo_lite.sh
Thank you, Hope this helps you
from mobilenet-yolo.
Hi @globalmaster , Sorry for the late reply.
Actually all your answers is mentioned by @eric612 , in the above comments. Anyway i'll join all comments and here is what you want:
Hope you have LMDB database of custom dataset with specific classes. I'll explain how i've done with 5 classes(excluding background). For example i have 5 classes(person, dog, cat, car, bus).In mobilenet_yolov3_lite_train.prototxt, modify:
- lmdb file path
- label_map.prototxt
- Modify 'num_output: 75' in the file as follows:-
the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
So if you have 5 classes(for eg:- person, dog, cat, car, bus), then the value is (5+5)*3=30, so modify 'num_output: 75' in file to 'num_output: 30'.- Search for 'num_class: 20' in the file and modify the value as follows:-
if you have 5 classes(for eg:- person, dog, cat, car, bus), then modify the value into 'num_class: 5'In mobilenet_yolov3_lite_test.prototxt, modify:
- lmdb file path
- label_map.prototxt
- Modify 'num_output: 75' in the file as follows:-
the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
So if you have 5 classes(for eg:- person, dog, cat, car, bus), then the value is (5+5)*3=30, so modify 'num_output: 75' in file to 'num_output: 30'.- Modify 'num_classes: 20' to 'num_classes: 5'
- Modify 'num_classes: 21' to 'num_classes: 6'
Once Training is done:
Modify the MobileNet-YOLO/examples/yolo/yolo_detect.cpp. You need to modify line:
char* CLASSES[21] = { "background", ....., "train", "tvmonitor" };
with classes.Then once again run make commands:
cd build
cmake ..
make -j4
make pycaffeNow modify MobileNet-YOLO/demo_yolo_lite.sh . Just now the eric has uploaded new mobilenet_yolov3_lite_deploy.prototxt , https://github.com/eric612/MobileNet-YOLO/blob/master/models/yolov3/mobilenet_yolov3_lite_bn_deploy.prototxt .
In mobilenet_yolov3_lite_bn_deploy.prototxt, modify:-
- Modify 'num_output: 75' in file to 'num_output: 30' following above same criterias
- Modify 'num_classes: 20' to 'num_classes: 5'
Now go ahead and run the command bash demo_yolo_lite.sh
Thank you, Hope this helps you
@PiyalGeorge
Hi PiyalGeorge, I follow your steps and run sh train_yolov3_lite_self.sh
and finally I obtain the caffe model.But when I run python merge_bn.py --model example/mobilenet_yolov3_lite_solver.prototxt --weights snapshot/mydata_deploy_iter_20000.caffemodel
It makes run and the feedback as follow:
Traceback (most recent call last):
File "merge_bn.py", line 60, in
net_deploy = caffe.Net(deploy_proto, caffe.TEST)
RuntimeError: Could not open file /media/pico/data2/kevin/MobileNet-YOLO/data/VOCself/remove_bn.prototxt
Should I create the remove_bn.prototxt first?
from mobilenet-yolo.
Hi @TianSong1991 , haven't you checked eric's latest update? he updated the repo today. There is no need for you to run merge_bn.py, since he has already gave you the file directly. This is the new file eric has added - https://github.com/eric612/MobileNet-YOLO/blob/master/models/yolov3/mobilenet_yolov3_lite_bn_deploy.prototxt .
In mobilenet_yolov3_lite_bn_deploy.prototxt, you need to modify as i specified above.
You also need to modify command in demo_yolo_lite.sh, with mobilenet_yolov3_lite_bn_deploy.prototxt
from mobilenet-yolo.
- the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
@PiyalGeorge
all the 75 in the train file need modify?
from mobilenet-yolo.
- the above 75 was obtained from the calculation (5+classno)*3, where classno is the number of classes(without considering background in the count), and here eric's classno is 20.
@PiyalGeorge
all the 75 in the train file need modify?
Bro, Yes. Above it specifies to Modify 'num_output: 75' in the file. so search for 'num_output: 75' in the file and modify that only. 😃 😃
from mobilenet-yolo.
Related Issues (20)
- About deepwise_conv_layer.cu,when bias_term = false,somting is wrong
- How do I load images instead of LMDB? HOT 8
- how to do inference on multiple images as one batch? HOT 1
- Best weight in training
- cuda版本的配置在哪个文件?Check failed: error == cudaSuccess (803 vs. 0) system has unsupported display driver / cuda driver combination HOT 2
- *** Error in `./build/tools/caffe': double free or corruption (!prev): 0x00007f5e15685ae0 *** HOT 1
- mobilenet_yolov3_lite does not converge HOT 1
- 关于Pelee + SSD + driverable maps
- How to test my own model ? HOT 5
- mobilenetv2_yolov3 caffe2ncnn转出的模型不能运行 HOT 4
- 多个gpu训练,卡住不动,gpu占用率为0 HOT 2
- 希望可以分享一下darknet-yolov3的模型,感谢! HOT 7
- 合并BN后,在GPU下循环测试同一张图片,输出不一致!!! HOT 1
- 能否添加clip层 HOT 3
- 您好,能否给一下您的联系方式,有问题想请教您
- question about add parameter yolo_data_type in batch_sampler?
- YOLOv3-quadrangle
- I think some codes in yolov3_layer.cpp is unreasonable. Should revise it?
- Question: finetune 13 class with custom dataset
- base_conv_layer.cpp:121] Check failed: channels_ % group_ == 0 (1 vs. 0) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mobilenet-yolo.