https://rishiraj-acharya.github.io/Helmet-Detector/
Using Keras and TensorFlow to train a classifier to automatically detect whether a person is wearing a helmet or not by fine-tuning the MobileNet V2 architecture.
Run the train_mask_detector.py
to accept the input dataset and fine-tune MobileNetV2 upon it to create the resulting serialized helmet_detector.model
classification model.
Open up a terminal, and execute the following command:
$ python detect_helmet_image.py --image examples/example_01.png
[INFO] loading face detector model...
[INFO] loading face helmet detector model...
[INFO] computing face detections...
Launch the helmet detector in real-time video streams using the following command:
$ python detect_helmet_video.py
[INFO] loading face detector model...
[INFO] loading face helmet detector model...
[INFO] starting video stream...