Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check NSFW in video files #17

Open
xcbtrader opened this issue Feb 15, 2019 · 0 comments
Open

Check NSFW in video files #17

xcbtrader opened this issue Feb 15, 2019 · 0 comments

Comments

@xcbtrader
Copy link

xcbtrader commented Feb 15, 2019

Hello.
I've used your libraries to detect NSFW content in videos.
It works correctly, but the problem is that I can't open the video frame and check it directly, as it tells me they are not compatible format. I need to open a frame, save it to disk in jpeg format, then open it and check.
Is there any way to load the frame and check it directly?

I use OPENCV libraries to open the video file.

I then put a piece of the code


while(True): 
  
	# reading from frame 
	ret,frame = cam.read() 

	if ret:
		if currentframe % salto_frames == 0:
			frames_analizados += 1
			cv2.imwrite('temp.jpg', frame)	
			image = fn_load_image('temp.jpg')
			
			predictions = \
				sess.run(model.predictions,
						feed_dict={model.input: image})

			nsf = predictions[0][0]
			nsfw = predictions[0][1]

I think it's possible to make

ret, frame = cam.read()
image = frame

Any idea??
Thank you for this great library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant