John1liu / YOLOV5-DeepSORT-Vehicle-Tracking-Master

In this project, urban traffic videos are collected from the middle section of Xi 'an South Second Ring Road with a large traffic flow, and interval frames are extracted from the videos to produce data sets for training and verification of YOLO V5 neural network. Combined with the detection results, the open-source vehicle depth model data set is used to train the vehicle depth feature weight file, and the deep-sort algorithm is used to complete the target tracking, which can realize real-time and relatively accurate multi-target recognition and tracking of moving vehicles.
86 stars 11 forks source link

loader failing #7

Open thangarajdeivasikamani opened 2 years ago

thangarajdeivasikamani commented 2 years ago

Hello , When I execute the repo I am getting below error. pls check.

(pytorchwebapi) C:\MachineLearning\Tracking\new\YOLOV5-DeepSORT-Vehicle-Tracking-Master>python track.py --source cut3.avi Namespace(agnostic_nms=False, augment=False, classes=[0, 1, 2, 3, 4], conf_thres=0.4, config_deepsort='deep_sort_pytorch/configs/deep_sort.yaml', device='', fourcc ='mp4v', img_size=640, iou_thres=0.5, output='inference/output', save_txt=False, source='cut3.avi', view_img=False, weights='yolov5/weights/best.pt') Traceback (most recent call last): File "track.py", line 265, in detect(args) File "track.py", line 73, in detect cfg.merge_from_file(opt.config_deepsort) File "C:\MachineLearning\Tracking\new\YOLOV5-DeepSORT-Vehicle-Tracking-Master\deep_sort_pytorch\utils\parser.py", line 24, in merge_from_file self.update(yaml.load(fo.read())) TypeError: load() missing 1 required positional argument: 'Loader'

(pytorchwebapi) C:\MachineLearning\Tracking\new\YOLOV5-DeepSORT-Vehicle-Tracking-Master>

kavinteng commented 2 years ago

You can use one of the yaml.full_load() or yaml.safe_load() methods.

thangarajdeivasikamani commented 2 years ago

You can use one of the yaml.full_load() or yaml.safe_load() methods.

thangarajdeivasikamani commented 2 years ago

Could you please share exact step where we need to specify the yaml file? And also location of the specificed ymal file in the repo. Because i have followed the same steps mentioned in the readme.md file still it's failed.

kavinteng commented 2 years ago

on dir "C:\MachineLearning\Tracking\new\YOLOV5-DeepSORT-Vehicle-Tracking-Master\deep_sort_pytorch\utils\parser.py". You will find parser.py with in code line 24 on function merge_from_file that is function use in project. And change it to self.update(yaml.safe_load(fo.read()))