yehengchen / Object-Detection-and-Tracking

Object Detection and Multi-Object Tracking
MIT License
1.85k stars 753 forks source link

YOLO_DEEP_SORT: error while running inference #114

Open neso613 opened 2 years ago

neso613 commented 2 years ago

Hi I am getting error while running commands - python main.py -c person -i testvideo.mp4

./model_data/yolo.h5 model, anchors, and classes loaded. Traceback (most recent call last): File "main.py", line 172, in <module> main(YOLO()) File "/home/cogknit/my_stuff/mahesh_projects/Object-Detection-and-Tracking/OneStage/yolo/deep_sort_yolov3/yolo.py", line 50, in __init__ self.boxes, self.scores, self.classes = self.generate() File "/home/cogknit/my_stuff/mahesh_projects/Object-Detection-and-Tracking/OneStage/yolo/deep_sort_yolov3/yolo.py", line 90, in generate score_threshold=self.score, iou_threshold=self.iou) File "/home/cogknit/my_stuff/mahesh_projects/Object-Detection-and-Tracking/OneStage/yolo/deep_sort_yolov3/yolo3/model.py", line 170, in yolo_eval anchors[anchor_mask[l]], num_classes, input_shape, image_shape) File "/home/cogknit/my_stuff/mahesh_projects/Object-Detection-and-Tracking/OneStage/yolo/deep_sort_yolov3/yolo3/model.py", line 148, in yolo_boxes_and_scores anchors, num_classes, input_shape) File "/home/cogknit/my_stuff/mahesh_projects/Object-Detection-and-Tracking/OneStage/yolo/deep_sort_yolov3/yolo3/model.py", line 113, in yolo_head box_xy = (box_xy + grid) / K.cast(grid_shape[::-1], K.dtype(feats)) File "/home/cogknit/anaconda3/envs/tf2.6/lib/python3.7/site-packages/tensorflow/python/util/traceback_utils.py", line 153, in error_handler raise e.with_traceback(filtered_tb) from None File "/home/cogknit/anaconda3/envs/tf2.6/lib/python3.7/site-packages/keras/layers/core/tf_op_layer.py", line 534, in handle return SlicingOpLambda(self.op)(*args, **kwargs) File "/home/cogknit/anaconda3/envs/tf2.6/lib/python3.7/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None ValueError: Subshape must have computed start >= end since stride is negative, but is 0 and 2 (computed from start 0 and end 9223372036854775807 over shape with rank 2 and stride-1)