Object Detection model using tensorflow.
pip install -r requirement.txt
python collect_data.py
Captured images are stored in data/images
labelme
-
It pop up a gui .
-
Open dir -> data/images
-
Change output dir -> data/labels
-
Select "Create Rectangle" in edit tab and select the object and give a label name.
Datas are distributed among different folder named test , train , val . Each of these folder contains images and labels.
python data_split.py
Datas are augmented using albumentations.The stored data along with labels will store in aug_data folder.
python data_augmentation.py
Pretrained model vgg16 is used for training. Output of vgg16 is given to a classification model which check wheather a face present and regression model to predict the position of the face.
Seperate loss functions are used for classification and regression.
Model saved as facetrain.h5 .
Opencv-python is used for real time object detection . It shows a rectangle bounding object if it present in the frame.
python real_time.py