Hi, I am trying to use this application from another application in python.
import cv2
from darkflow.darkflow.defaults import argHandler #Import the default arguments
from darkflow.darkflow.net.build import TFNet
import numpy as np
import time
After results = tfnet.return_predict(frame), I want to feed this data to a tracking algorithm (deep_sort), so that I can get results with trackid.
How can I do that?
Thanks
Hi, I am trying to use this application from another application in python.
import cv2 from darkflow.darkflow.defaults import argHandler #Import the default arguments from darkflow.darkflow.net.build import TFNet import numpy as np import time
option = { 'model': 'darkflow/cfg/yolo-voc.2.0.cfg', 'load': 'darkflow/bin/yolo-voc_26600.weights', 'threshold': 0.15, 'gpu': 0.5, 'track': True, 'trackObj': ["person"], 'saveVideo': False, 'BK_MOG':True, 'tracker': "deep_sort", 'skip': 0, 'csv': True, 'display':True }
tfnet = TFNet(option)
capture = cv2.VideoCapture(0) # using webcamera colors = [tuple(255 * np.random.rand(3)) for i in range(5)]
while (capture.isOpened()): stime = time.time() ret, frame = capture.read() contours_now = [] if ret: results = tfnet.return_predict(frame)
After results = tfnet.return_predict(frame), I want to feed this data to a tracking algorithm (deep_sort), so that I can get results with trackid. How can I do that? Thanks