-
Notifications
You must be signed in to change notification settings - Fork 8k
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
YoloV3 Tiny PRN Training #4858
Comments
|
If you only want to discard some of classes without adding new classes, it is better to modify load_weight function. |
CFG Files (Extension changed due to github restrinctions) I trained the model with only 2 classes: person,car PS: For this test I used 6000 iterations for class, so max_batches = 12000 |
Default yolov3-tiny-prn model has mAP@50,
|
Instead of this: |
Because, I've not understood what is the right image aspect ratio to supply to Yolo. If I have a 16:9 (570x320 for example) frame:
|
Every image will be resized to the network size automatically. Follow general rule to calculate network size and images size: https://github.com/AlexeyAB/darknet#how-to-improve-object-detection
|
If I would like to train model a to a different resolution, can I use yolov3-tiny-prn.conv.15 (pre-trained at 416x416) ? Or I need to start from scratch? |
Yes. |
Thanks Alexey! You are a boss :) |
To keep the distortion of a similar level in training and testing, Can we train the network with one width & height values and have different width & height values during inference? |
Hi all,
I'm going crazy in order to train YoloV3 Tiny PRN, I've read all possible about it and trying to merge all information in a script that prepares an enviroment to train model according to required objects.
First of all YoloV3 Tiny PRN is absolutely good but I would like to remove useless objects (tie, pen, bottle...) so I created a scripts that executes following steps:
./script --evironmanet-name name --allowed-objects car,person,dog...
Create a directory with a precise structure:
./environment-name/cfg/
./environment-name/dataset/images/train2014/
./environment-name/dataset/images/val2014/
./environment-name/dataset/labels/train2014/
./environment-name/dataset/labels/val2014/
-/environment-name/output/
Copy all COCO dataset 2014 from source to my environment directory:
coco_source (train images) -> ./environment-name/dataset/images/train2014/
coco_source (val images) -> ./environment-name/dataset/images/val2014/
Label index correction
My goal is to remove useless objects from detection so is necessary to generate a new file objects.names and objects will have a new index from original coco index according to my script parameter.
so if original is:
0 - person
1 -bicycle
2 - car
3 - motorbike
and my allowed objects are:
0 - person
1 - car
I need to correct COCO labels with new index related to object (car - from index 2 must become 1) and remove all object coordinates related to objects not required.
My script copy labels from source, edit them and place them to:
./environment-name/dataset/labels/train2014/
./environment-name/dataset/labels/val2014/
Create objects.names file in ./environment-name/objects.names
Create model.data file in ./environment-name/model.data with content:
classes=$(number_of_classes)
train = ./environment-name/list.txt
valid = ./environment-name/val.txt
names = ./environment-name/objects.names
backup = ./environment-name/output
Create a file list.txt with all images available in ./environment-name/dataset/images/train2014/
Create a file val.txt with all images available in ./environment-name/dataset/images/val2014/
Copy source of yolov3-tiny-prn.cfg to ./environment-name/cfg/model.cfg and edit it following these rules:
9. Create a train.sh script that starts training with following command:
./darknet detector train '.$model_data_path.' '.$model_cfg_path.' yolov3-tiny-prn.conv.15
According to this ticket: #4091 (comment)
Is necessary to use pretrainer weight so I generated it from yolov3-tiny-prn.weights with command:
./darknet partial cfg/yolov3-tiny-prn.cfg yolov3-tiny-prn.weights yolov3-tiny-prn.conv.15 15
Why each model that I try to train is very very far from results of original yolov3-tiny-prn (Lower mAP)?
What I'm doing wrong?
This script is for my purpose but once it will be created and fully working I would like to share with the community.
The text was updated successfully, but these errors were encountered: