Exemplo n.º 1
0
def test_detection_video():

    detection = Detection(config, name="mask")

    video = os.path.join(IMAGES_DIR, "video.mp4")

    res = detection.detectObjectVideo(video, output="vid.mp4")

    savedVid = cv2.VideoCapture("vid.mp4")

    totalframecount = int(savedVid.get(cv2.CAP_PROP_FRAME_COUNT))

    assert totalframecount == 1193
Exemplo n.º 2
0
from deepstack_sdk import ServerConfig, Detection

config = ServerConfig("http://localhost:80")
detection = Detection(config)

detection.detectObjectVideo("video.mp4",output="video_output.mp4")


"""
:: detection.detectObjectVideo()

--- Available Paramaters

- video (file, Camera video feed IP, integer for OpenCV Camera e.g 0, 1, 2)
- min_confidence (0.1 to 1.0)
- codec (Default: cv2.VideoWriter_fourcc(*'mp4v') )
- fps (frames per second)
- continue_on_error (Default: false)
- output (file path, cv2.VideoWriter)
- output_font (cv2 font)
- output_font_color ( r, g, b )
"""