Skip to content

muratali016/Yolov7-Cigarette-Censor-and-Smoker-s-Faces-Recorder

Repository files navigation

Yolov7-cigarette-censor-and-smokers-face-recorder

  • Censoring and counting all cigarettes on the screen and saving smoker's faces in the folder or any database
  • Useful for public non-smoking areas
  • Code can run on Both (CPU & GPU)
  • Video/WebCam/External Camera/IP Stream Supported
yolo_cigarette.mp4

It is super easy to run

  • We are going to copy my repo and just download "traced_model.pt" which is already given by me in the code, and we are good to go!

Steps to run Code

Upgrade pip with the mentioned command below.

pip install --upgrade pip

Install requirements with the mentioned command below.

pip install -r requirements.txt

Using counter

  • %cd /content/Yolov7-cigarette-censor-and-smokers-face-recorder
  • %!python detect.py --weights best_cigarette.pt --conf 0.1 --source /content/Yolov7-cigarette-censor-and-smokers-face-recorder/example_img.jpg --cigarette_blurrate 50 --shape_detector /content/Yolov7-cigarette-censor-and-smokers-face-recorder/shape_predictor_68_face_landmarks.dat

Results!

exp exp2

Inference on a video:

https://www.youtube.com/watch?v=ld9nP8-ZsQw

References

Releases

No releases published

Packages

No packages published

Languages