Closed sivaji123256 closed 1 year ago
Hi @sivaji123256 Sorry, there is a problem with google drive where weights and colab notebook were stored. I've updated links in readme, please check.
Also some problems with dependencies occured while running in colab because of new libs versions. So I've changed 'requirements.txt' a bit to make it work in test colab notebook. Hope it will not cause new challenges with setting up local environment (but not sure) :)
About custom training steps... I'll try to recall the details and let you know if there's anything
Thanks @tvelovraf .I was able to run the demo in colab. But, I was trying to train on my own dataset. Can you try to recall the custom training steps and data preparation?
Hi @sivaji123256 Our training steps was based on two well-known repositories (as mentioned in readme):
https://github.com/WongKinYiu/ScaledYOLOv4.git
Steps:
a) Label boxes with https://www.robots.ox.ac.uk/~vgg/software/via/ -> .csv
with annotations for each image
b) Obtain from annotations in .csv
directory with structure:
img_name1.extension
<-- image1img_name1.txt
<-- contain coordinate of all boxes for image img_name1.extension
img_name2.extension
img_name2.txt
...
example of img_name.txt
with 2 boxes (all coordinates are normalized):
0 0.6312 0.0983 0.1033 0.0958 <-- index of class, x coord of box center, y --''--, width of box, height of box
0 0.6433 0.3777 0.0781 0.1972
c) Create 2 files with paths to .txt
files with anns of boxes:
train_imgs_paths.txt
val_imgs_paths.txt
d) Create data.yaml
file like: https://github.com/WongKinYiu/ScaledYOLOv4/blob/yolov4-large/data/coco.yaml
(You may left only two first lines)
e) Launch training (see readme in https://github.com/WongKinYiu/ScaledYOLOv4.git)
Maybe using of yolov7 is more reasonable today: https://github.com/WongKinYiu/yolov7
https://github.com/qubvel/segmentation_models.pytorch of version 0.2.1
Steps:
a) Label masks as polygons with https://www.robots.ox.ac.uk/~vgg/software/via/ -> .csv
with annotations for each image
b) Transforming polygons to masks files
c) Next everything is similar to https://github.com/qubvel/segmentation_models.pytorch/blob/master/examples/cars%20segmentation%20(camvid).ipynb
Labeling of segmentation masks is time consuming. But You can:
portion_1
of datamodel_1
model_1
portion_1
(with correction of masks) --> you have portion_2
This strategy can also be applied to the detection.
Hi @tvelovraf @cassowary-bird @Hifrom , I was trying to replicate your code. But unfortunately ,I couldn't access colab version of the code and also weights link attached in the readme file. Can you share the link for pretrained weights? Also, I was trying to train on own dataset? Can you also add the steps you followed for custom training ?