obendidi / Tracking-with-darkflow

Real-time people Multitracker using YOLO v2 and deep_sort with tensorflow
GNU General Public License v3.0
524 stars 174 forks source link

I want to track by using deep_sort or sort, but have some errors #50

Open sunshinezhihuo opened 6 years ago

sunshinezhihuo commented 6 years ago

In the run.py, whatever I set FLAGS.tracker = "deep_sort" or set FLAGS.tracker = "sort", the tracker can not work, and show that: File "/home/xx/Tracking-with-darkflow/darkflow/darkflow/net/help.py", line 88, in camera fgbg = cv2.bgsegm.createBackgroundSubtractorMOG() AttributeError: module 'cv2.cv2' has no attribute 'bgsegm'

So then, I set FLAGS.BK_MOG = False, but still can not work, and shows that: ` File "/home/xx/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/variable_scope.py", line 639, in _get_single_variable name, "".join(traceback.format_list(tb))))

ValueError: Variable ball/mean_vectors already exists, disallowed. Did you mean to set reuse=True in VarScope? Originally defined at:

File "/home/xx/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 225, in variable partitioner=partitioner) File "/home/xx/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/arg_scope.py", line 177, in func_with_args return func(*args, **current_args) File "/home/xx/anaconda3/lib/python3.6/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 268, in model_variable partitioner=partitioner, custom_getter=custom_getter)` Do you have the same errors, and how do you solve them?

uwmyuan commented 6 years ago

Hi sunshinezhihuo, You may like to follow this post to fix the bgsegm problem.