OlafenwaMoses / ImageAI

A python library built to empower developers to build applications and systems with self-contained Computer Vision capabilities
https://www.genxr.co/#products
MIT License
8.55k stars 2.19k forks source link

i am facing this kind of problem when i am typing the live video prediction code...Please i am new to this..kindly help me out.. #173

Closed nswaglerevs closed 5 years ago

nswaglerevs commented 5 years ago

TypeError Traceback (most recent call last)

in () 16 video_path = detector.detectObjectsFromVideo(camera_input=camera, 17 output_file_path=os.path.join(execution_path, "camera_detected_video") ---> 18 , frames_per_second=20, log_progress=True, minimum_percentage_probability=40) TypeError: detectObjectsFromVideo() got an unexpected keyword argument 'camera_input'
OlafenwaMoses commented 5 years ago

Post your full code here.

nswaglerevs commented 5 years ago

from imageai.Detection import VideoObjectDetection import os import cv2

execution_path = os.getcwd()

camera = cv2.VideoCapture(0)

detector = VideoObjectDetection() detector.setModelTypeAsRetinaNet() detector.setModelPath(os.path.join(execution_path , "resnet50_coco_best_v2.0.1.h5")) detector.loadModel()

video_path = detector.detectObjectsFromVideo(camera_input=camera, output_file_path=os.path.join(execution_path, "camera_detected_video") , frames_per_second=20, log_progress=True, minimum_percentage_probability=40)

Image prediction and video prediction code is working but this live streaming code isn't working..please kindly help me with this.. Thank you..

ayadav10491 commented 5 years ago

Facing the same issue

OlafenwaMoses commented 5 years ago

Please visit the tutorial linked below on resolving this.

https://heartbeat.fritz.ai/analyze-and-visualize-detected-video-objects-using-keras-and-imageai-d84c99b0ae8e