notAI-tech / NudeNet

Lightweight nudity detection
https://nudenet.notai.tech/
GNU Affero General Public License v3.0
1.76k stars 342 forks source link

Add way to visualise predict results on video #89

Open evvfebruary opened 3 years ago

evvfebruary commented 3 years ago

Hello! Really thank you for this repository, awesome work!

When i used detect on vieo at the first time I really wanted to visualise box and labels on the video ( for some checks, or just present result of net work).

Unfortunally, right now i cant do this using existing functions, because detect video method dont have any way to write output video with box and labels.

My suggestions: 1) I can add output_path parameter ( as you do in censor function). 2) Add option to turn off find only interested frames ( because if we want visualise boxes and labels, i think we need to draw it on each frame ) 3) Using info from predictions result i can draw each box and label near using cv2.rectangle and cv2.putText 4) Write video with drawed boxes and labels using cv2.VideoWriter

If this feature sounds interesting for you just give me some feedback, and i can make a pull request with this functionality.

bedapudi6788 commented 3 years ago

My suggestions:

I can add output_path parameter ( as you do in censor function).
Add option to turn off find only interested frames ( because if we want visualise boxes and labels, i think we need to draw it on each frame )
Using info from predictions result i can draw each box and label near using cv2.rectangle and cv2.putText
Write video with drawed boxes and labels using cv2.VideoWriter

these would be great features to have! Your ideas for this sound spot on. Please feel free to make pull request.

evvfebruary commented 3 years ago

Thanks for your feedback! Will be back with a pull request next time )