i put https://www.kaggle.com/datasets/sbaghbidi/human-faces-object-detection/data in a folder named faceDataset
it consists of a faceDataset/faces.csv
and a images
directory with 3000+ images
i downloaded another dataset https://universe.roboflow.com/jonathan-chandra/face-mask-object-detection from detecting face mask. it has a yolo format so i need to call its directory datasets
. i want to steal a pre-trained yolo model but i only got a dataset.
i use csv_to_yolo.py
to convert faceDataset/faces.csv
into labels
of yolo format so we can use those later?
The labels are stored in faceDataset/labels
i use add_face_mask.py
to add face masks (face_mask.png
) into the images of faceDataset
their file names ends with _modified
i trained the yolo model with face_detection.py
for 8 epochs (i found that i forgot to load the previous trained model for the first few models :P) and it automatically stored the resulting model in runs/detect/train10/weights/best.pt
need to change the model inside the code
to see the result, run detect.py
need to change the model and image inside
note: i put:
00000xxx.jpg
00000xxx_modified.jpg
totest
00001xxx.jpg
00002xxx.jpg
00001xxx_modified.jpg
00002xxx_modified.jpg
totrain
00003xxx.jpg
00003xxx_modified.jpg
tovalid
for better training sincetrain11
rip 30 minute a epoch on my labtop
how to use colab to train?
- pass family photo to
detect.py
- if
masked
, do similarity checker with other photos provided by user - image registration inside each bounding boxes (similar to how i add face masks in
add_face_mask.py
?) - output final image