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

training procedure #1

Open
danFromTelAviv opened this issue Feb 17, 2019 · 8 comments
Open

training procedure #1

danFromTelAviv opened this issue Feb 17, 2019 · 8 comments

Comments

@danFromTelAviv
Copy link

danFromTelAviv commented Feb 17, 2019

Hi ,
First of all thanks for this great work !
I would like to replicate your system for a custom object detector.
What were the steps you took to train.
I assume that batch size was larger than 1. Did you pretrain your network in anyway or did you train directly on your data? Did you optimize the anchors in anyway ? Anything else that was significant in stabilizing the learning or improving accuracy?

I am also curious to hear if you tried a version with only 4 down sampling steps and 4x fewer features after that to deal with smaller objects? or using a second "yolo" layer like in tiny yolo v3.

Thanks,
Dan

@gplast
Copy link
Owner

gplast commented Mar 7, 2019

Hello and thank you for your interest on my work,

Please have in mind that DroNet structure is optimized mostly car detection from top-view detection.

Moreover, if you want to train DroNet for custom object you need to change the filter before prediction according to YoloV2. Batch size was larger indeed, 1 is only when you run demo/testing, you can set batch and subdivision according to your Graphics Card Ram. If at some point you get Cuda out of memory, you need to increase subdivision, or decrease batch.

I did extract the anchor boxes based on our dataset and i didn't use pretrain weights. The thinks that i did to optimize the learning/accuracy was to test different structures in order to find the best structure for the specific application needs.

Lastly, we further optimize DroNet proposing DronetV3 which is actually using second yolo layer where we are able to increase the detection for pedestrian detection. If you are interested for aerial-view detection with smaller object you can find a paper where we address this problem - https://zenodo.org/record/2566760#.XIEK_igzaUk

At some point i will create/update this repository with the implementation of the paper that i send you and you can test it. For now i can send you the DroNetV3 (change .txt to .cfg) structure which i hope that it can help you with your implementation.

If you need anything else let me know,
--George

DroNetV3.txt

@danFromTelAviv
Copy link
Author

thank you very much for getting back to me. After some fighting I was able to train for rigid objects. I also tried adding a second yolo layer at high resolution and it also helped me. I will read your v3 and try it out.

Out of curiosity did you try nnpack-darknet to seep things up?
I wasn't able to get it to work but I did try out opencv's dnn package. It's pretty fast.

@spaul13
Copy link

spaul13 commented Oct 1, 2019

@danFromTelAviv it will be a great help if u can plz tell me how u train the DroNet Model for custom objects? I am planning to train this for Imagenet dataset. Any help will highly be appreciated.

@gplast
Copy link
Owner

gplast commented Oct 3, 2019

Hello @spaul13,

In order to train DroNet you need to change both cfg/DroNetV3_car.cfg and car_ped.data.
You can follow this guide which is based on Darknet framework: https://github.com/AlexeyAB/darknet#how-to-train-tiny-yolo-to-detect-your-custom-objects

Please read this carefully and use DroNetV3 configuration instead of tiny-yolo. Please also have in mind that you cannot use the weights of tiny-yolo that you see in the guide since the weights work only for the tiny-yolo configuration.

Hope this helps, if you need anything else, please let me know.

@spaul13
Copy link

spaul13 commented Oct 22, 2019

@gplast @danFromTelAviv , after changing the # of filters before yolo layers based on custom dataset and also after extracting initial pretrained weights for the (14) convolution layers from the already available DroNetv3_car.weights, I started training following the darknet repository (https://github.com/AlexeyAB/darknet).

But I tested the weight after 1000 iterations, its not detecting anything on the different image from the same dataset.

But I have trained tiny-yolov3 the same way, its accuracy got improve for similar dataset and its detecting the bounding box properly.

Can anyone plz tell me why nothing got detected after 1000 iterations for DroNetv3 model?

@danFromTelAviv
Copy link
Author

Hi @spaul13 ,
If my memory serves me it took me way way more than 1000 iterations. Notice that there is a warm up period in which training is very slow ( its in the first few lines of the network cfg file ). You also need at least hundreds of images in case you don't have that.
good luck!

@spaul13
Copy link

spaul13 commented Oct 23, 2019

Thanks a lot for replying me back @danFromTelAviv. Just with 1000 iterations I achieve achieve very good accuracy for tiny-yolo whereas Dronet not even detecting anything after 1000 iterations. That's why I asked. As par u suggested I will do multiple more iterations with more number of images.

@joel5638
Copy link

How to initiate the training with DroNet3.cfg and what weight file should i use to initiate the training?

My target is to have a model less than 1MB that detects objects

please help. Thank you

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

4 participants