Coder Social home page Coder Social logo

howiema / deepsort_yolov5_pytorch Goto Github PK

View Code? Open in Web Editor NEW
325.0 4.0 64.0 56.74 MB

DeepSORT + YOLOv5

Python 96.86% Shell 2.57% Dockerfile 0.57%
yolov5 deepsort yolov5-deepsort-pytorch pytorch multi-object-tracking simple-online-and-realtime-tracking

deepsort_yolov5_pytorch's People

Contributors

howiema avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

deepsort_yolov5_pytorch's Issues

Camera 0 error and Illegal instruction (core dumped)

Hi there. I have tried running the programme on 2 seperate instances and have encountered these errors. I have made sure to have connected the webcam (the only webcam too), so that it takes --cam 0 correctly.

Here are the terminal outputs

python3 main.py --cam 0 --display
Namespace(agnostic_nms=False, augment=False, cam=0, classes=[0], conf_thres=0.5, config_deepsort='./configs/deep_sort.yaml', device='', display=True, display_height=600, display_width=800, fourcc='mp4v', frame_interval=2, img_size=640, input_path='input_480.mp4', iou_thres=0.5, save_path='output/', save_txt='output/predict/', weights='yolov5/weights/yolov5s.pt')
Initialize DeepSORT & YOLO-V5
Using CPU

Using webcam 0
Done..
Camera ...
Done. Create output file  output/results.mp4
Illegal instruction (core dumped)

And in another instance, I have a different error citing camera error

python3 main.py --cam 0 --display
Namespace(agnostic_nms=False, augment=False, cam=0, classes=[0], conf_thres=0.5, config_deepsort='./configs/deep_sort.yaml', device='', display=True, display_height=600, display_width=800, fourcc='mp4v', frame_interval=2, img_size=640, input_path='input_480.mp4', iou_thres=0.5, save_path='output/', save_txt='output/predict/', weights='yolov5/weights/yolov5s.pt')
Initialize DeepSORT & YOLO-V5
Using CPU

Using webcam 0
Done..
Camera ...
[ WARN:0] global /tmp/pip-req-build-tpkxoqhj/opencv/modules/videoio/src/cap_v4l.cpp (1001) tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.
Traceback (most recent call last):
  File "main.py", line 259, in <module>
    with VideoTracker(args) as vdo_trk:
  File "main.py", line 75, in __enter__
    assert ret, "Error: Camera error"
AssertionError: Error: Camera error

The camera error occured right after the illegal instruction (core dumped) episode. When the programme was first run, the windows for the display could be open, but there is no video feed, and it just stops responding in Ubuntu (window goes greyscale)

Error title is :

python3.8 crashed with SIGILL in exec_blas()

If required, my device's techncial specs
DJI Manifold 2G (Nvidia Jetson TX2)
ARMv8 Processor rev 3 (v8l) × 4 ARMv8 Processor rev 0 (v8l) × 2
NVIDIA Tegra X2 (nvgpu)/integrated
8GB ram, Ubuntu 18.04 LTS

Questions about the new yolov5 model

As for the new model of yolov5, I have checked that the version of yolov5 you used is 2.0, so I trained a helmet detection model with the corresponding version, and it has been tested by yolov5 alone and is effective. However, after I imported this model into your project, nothing can be detected. Is there anything that needs to be modified.

Looking forward to your reply very much!

显卡在训练中,希望使用cpu推理,结果命令行输入--device cpu却更换不了设备

1.找到选择device的区域

Untitled

发现没有进入if语句,查看if语句之前的device.type确定是cpu,但是if判断语句中’cpu’是字符串,而device.type是cpu <class 'torch.device'>所以没有进入if语句。

2.device.type的类别是字符串,修改为device.type。还是报错

Untitled

分析:追溯是执行vdo_trk.run()是出现问题。查看self.image_track(img0)使用的设备,发现是cpu,没问题。接着查看time_synchronized,发现错误

/home/ahei/DeepSORT_YOLOv5_Pytorch-master/yolov5/utils/torch_utils.py line 53 time_synchronized

原来,首先检查了torch.cuda.is_available()有的话调用了torch.cuda.synchronize(),然而我们的gpu在跑代码显存满了,所以报错。修改如下,问题解决。

The REID part costs time too much

Hello, we run the code successfully, but we find a question of the time costing.
In the sort part, the average time is about 40ms, but there are few frames taking more than 500ms. After investigation, it is determined that the time-consuming part of network (feature extraction part) reasoning has increased sharply, and the Layer4 takes the most time.
Have you encountered any similar problems? How to solve them, thanks!

Environment:
Xavier AGX 16GB - Jetpack 4.4
python 3.6.9
pytorch 1.6.0
opencv 4.1.1

图片1
图片2

Hi,I have some issues

Hi,I successfully run this project,but I have tried a lot of weights(yolov5s.pt) of different version from yolov5 official website,It kept telling me with"Can't get attribute 'C3' on <module 'models.common' >"So which version of yolov5 should I choose?Thank you so much.

TypeError: load() missing 1 required positional argument: 'Loader'

Hello. I am trying to run your programme after installing pip install -r requirements.txt
However, i have ran into an error "TypeError: load() missing 1 required positional argument: 'Loader'"

This is the full output:

$ python main.py --cam 0 --display
Namespace(agnostic_nms=False, augment=False, cam=0, classes=[0], conf_thres=0.5, config_deepsort='./configs/deep_sort.yaml', device='', display=True, display_height=600, display_width=800, fourcc='mp4v', frame_interval=2, img_size=640, input_path='input_480.mp4', iou_thres=0.5, save_path='output/', save_txt='output/predict/', weights='yolov5/weights/yolov5s.pt')
Initialize DeepSORT & YOLO-V5
Using CPU

Using webcam 0
Traceback (most recent call last):
  File "main.py", line 259, in <module>
    with VideoTracker(args) as vdo_trk:
  File "main.py", line 53, in __init__
    cfg.merge_from_file(args.config_deepsort)
  File "/home/dji/Desktop/targetTrackers/howieMa/DeepSORT_YOLOv5_Pytorch/utils_ds/parser.py", line 23, in merge_from_file
    self.update(yaml.load(fo.read()))
TypeError: load() missing 1 required positional argument: 'Loader'

I have found some suggestions on github, such as in here https://stackoverflow.com/questions/69564817/typeerror-load-missing-1-required-positional-argument-loader-in-google-col,
which suggests to change yaml.load to yaml.safe_load

However, doing so leads me to this error instead


$ python main.py --cam 0 --display
Namespace(agnostic_nms=False, augment=False, cam=0, classes=[0], conf_thres=0.5, config_deepsort='./configs/deep_sort.yaml', device='', display=True, display_height=600, display_width=800, fourcc='mp4v', frame_interval=2, img_size=640, input_path='input_480.mp4', iou_thres=0.5, save_path='output/', save_txt='output/predict/', weights='yolov5/weights/yolov5s.pt')
Initialize DeepSORT & YOLO-V5
Using CPU

Using webcam 0
Done..
Camera ...
Done. Create output file  output/results.mp4
Illegal instruction (core dumped)

Has anyone encountered anything similar ? Thank you !

yolov5 weights link failed

Hi, I click the link of yolov5 weights, it seems in a google drive trash.
But then I realized it must be an official weight offered by glenn-jocher.
So, maybe you can change the link to a workable one or link to the yolov5?

Can not use the latest yolov5 weights.

Hey,wonderful job! But when I used the latest weights , error shows like "AttributeError: Can't get attribute 'C3' on <module 'models.common' ".And I found out that latest yolov5 project is necessary. Do you have any plan to update this project?

Error

Hello, I am unable to run this implementation
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.