Git Product home page Git Product logo

libtorch-yolov3-deepsort's People

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libtorch-yolov3-deepsort's Issues

追踪框存在少许飘移

在做追踪的时候,bbox会在画面中存在前后帧飘移现象,但如果去掉跟踪,bbox是不会飘移的,说明检测器检测出来的bbox很好,应该是做跟踪的时候对bbox做了微调,请问是在哪做的?

Input image shape

你好, 我想知道你代码里的YOLO输入图像的形状是什么? 我看另一个PyTorch版本的输入图像会resize到(416, 416), 但是你的代码中没有这样处理. 输入图像形状对结果有影响吗

The re-id dosen't work

when i run this, it is the same result without ckpt.bin, and it has many id switch in my videos.
does the re-id is valid in this project?

OBJECT CLASS

Hello admin, i am very appreciate what you have done. But something in your code i still confuse so i hope you can help me.
My question is: How can i get the object's id class? From my understand, in your code you just take only the bbox of the object you have detected right?
Thank you

about the ckpt.bin

测试deep sort的时候,相关路径下没有ckpt.bin(忘记下载了),tracker也可以正常工作,请问这种情况是没有用到特征提取的网络吗?

how to convert the market trained model to 'ckpt.bin'?

Thank you to open your code!
i git your recommend repo and this repo
because i use Market1501 datasets and input :

python train_market1501.py \
    --dataset_dir=./Market-1501-v15.09.15/ \
    --loss_mode=cosine-softmax \
    --log_dir=./output/market1501/ \
    --run_id=cosine-softmax

trained a model ,the model file likes the below:

model.ckpt-20000.data-00000-of-00001
model.ckpt-20000.meta
model.ckpt-20000.index

so could you tell or share code to us that how to convert this model to the 'ckpt.bin' model ?

thank you !!

请问hub主用代码跑出的帧率是多少?(内附复现hub主代码后在MOT16上的Tracking Results)

我的显卡 Geforce GTX 2070
deepSORT 作者显卡 GeForce GTX 1050

复现hub主代码后 在MOT16数据集上只能跑出 3fps 的帧率(作者论文中是 40fps)
差距有点大 所以想请教下hub主自己实现的帧率是多少?

另附自己在MOT16上的Tracking Results
********************* Your MOT16 Results *********************
IDF1 IDP IDR | Rcll Prcn FAR | GT MT PT ML | FP FN IDs FM | MOTA MOTP MOTAL
45.149 61.26 35.748 | 44.706 76.612 2.8345 | 517 49 255 213 | 15068 61048 387 1173 | 30.708 78.247 31.056

Installed libtorch-cuda10-1.2.0,opencv4.0.1 . When I make an error, have anyone encountered and solved this problem?

In file included from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:5:0:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘std::array<long int, 2ul> letterbox_dim(c10::IntArrayRef, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:22: error: missing template arguments before ‘{’ token
return std::array{int64_t(img_h * s), int64_t(img_w * s)};
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:22: error: expected ‘;’ before ‘{’ token
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:11:61: error: expected ‘;’ before ‘}’ token
return std::array{int64_t(img_h * s), int64_t(img_w * s)};
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘cv::Mat letterbox_img(const cv::Mat&, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:16:9: error: expected unqualified-id before ‘[’ token
auto[new_h, new_w] = letterbox_dim({img.rows, img.cols}, box);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:16:60: error: expected primary-expression before ‘,’ token
auto[new_h, new_w] = letterbox_dim({img.rows, img.cols}, box);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:21:30: error: ‘new_h’ was not declared in this scope
out({int((h - new_h) / 2), int((h - new_h) / 2 + new_h)},
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:22:30: error: ‘new_w’ was not declared in this scope
{int((w - new_w) / 2), int((w - new_w) / 2 + new_w)}),
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:22:72: error: no match for call to ‘(cv::Mat) (, )’
{int((w - new_w) / 2), int((w - new_w) / 2 + new_w)}),
^
In file included from /usr/local/include/opencv2/core/mat.hpp:3699:0,
from /usr/local/include/opencv2/core.hpp:59,
from /usr/local/include/opencv2/opencv.hpp:52,
from /home/libtorch-yolov3-deepsort/detection/include/Detector.h:6,
from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:3:
/usr/local/include/opencv2/core/mat.inl.hpp:904:5: note: candidate: cv::Mat cv::Mat::operator()(cv::Range, cv::Range) const
Mat Mat::operator()( Range rowRange, Range colRange ) const
/usr/local/include/opencv2/core/mat.inl.hpp:904:5: note: no known conversion for argument 1 from ‘’ to ‘cv::Range’
/usr/local/include/opencv2/core/mat.inl.hpp:910:5: note: candidate: cv::Mat cv::Mat::operator()(const Rect&) const
Mat Mat::operator()( const Rect& roi ) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:910:5: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/core/mat.inl.hpp:916:5: note: candidate: cv::Mat cv::Mat::operator()(const cv::Range*) const
Mat Mat::operator()(const Range* ranges) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:916:5: note: candidate expects 1 argument, 2 provided
/usr/local/include/opencv2/core/mat.inl.hpp:922:5: note: candidate: cv::Mat cv::Mat::operator()(const std::vectorcv::Range&) const
Mat Mat::operator()(const std::vector& ranges) const
^
/usr/local/include/opencv2/core/mat.inl.hpp:922:5: note: candidate expects 1 argument, 2 provided
In file included from /home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:5:0:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h: In function ‘void inv_letterbox_bbox(at::Tensor, c10::IntArrayRef, c10::IntArrayRef)’:
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:31:9: error: expected unqualified-id before ‘[’ token
auto[new_h, new_w] = letterbox_dim(img_dim, box_dim);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:33:34: error: ‘new_w’ was not declared in this scope
bbox.select(1, 0).add
(-(w - new_w) / 2).mul
(1.0f * img_w / new_w);
^
/home/libtorch-yolov3-deepsort/detection/src/letterbox.h:36:34: error: ‘new_h’ was not declared in this scope
bbox.select(1, 1).add_(-(h - new_h) / 2).mul_(1.0f * img_h / new_h);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp: In function ‘auto {anonymous}::threshold_confidence(at::Tensor, float)’:
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:14:13: error: expected unqualified-id before ‘[’ token
auto[max_cls_score, max_cls] = pred.slice(1, 5).max(1);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:15:9: error: ‘max_cls_score’ was not declared in this scope
max_cls_score *= pred.select(1, 4);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:22:32: error: ‘max_cls’ was not declared in this scope
max_cls.index_select(0, index),
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp: In member function ‘std::vector<cv::Rect_ > Detector::detect(cv::Mat)’:
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:87:9: error: expected unqualified-id before ‘[’ token
auto[bbox, cls, scr] = threshold_confidence(prediction, confidence_threshold);
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:88:5: error: ‘bbox’ was not declared in this scope
bbox = bbox.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:89:5: error: ‘cls’ was not declared in this scope
cls = cls.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:90:5: error: ‘scr’ was not declared in this scope
scr = scr.cpu();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:99:35: error: expected primary-expression before ‘float’
auto bbox_acc = bbox.accessor<float, 2>();
^
/home/libtorch-yolov3-deepsort/detection/src/Detector.cpp:100:33: error: expected primary-expression before ‘float’
auto scr_acc = scr.accessor<float, 1>();
^
detection/CMakeFiles/detection.dir/build.make:89: recipe for target 'detection/CMakeFiles/detection.dir/src/Detector.cpp.o' failed
make[2]: *** [detection/CMakeFiles/detection.dir/src/Detector.cpp.o] Error 1
CMakeFiles/Makefile2:151: recipe for target 'detection/CMakeFiles/detection.dir/all' failed
make[1]: *** [detection/CMakeFiles/detection.dir/all] Error 2
Makefile:90: recipe for target 'all' failed
make: *** [all] Error 2

Does it affect the image size?

I have performed deepsort from a real-time camera.

However, an error occurs during execution because the image size is 4096 * 2160 -> 4K, and the program terminates.

I confirmed that there is no problem when the image size is 14401080 or 720540.

Is there a size limitation for images in deepsort??
Thank you.

enviroment list please

Can anyone tell me which version of libtorch,opencv,visual stdio you use could works?
I have tried many times in the environment of vs2019, libtorch1.4, opencv 4.2.there is a bug at Darknet.cpp #line142 x = torch::cat({map_1, map_2}, 1); I guess the version of vs or libtorch is not match,so could anybody who has run successfully tell me what the version is

Error when building with "make" on Ubuntu 18.04

Hello all,

I need a bit of help with building the repository. My specifications are as follows:

Ubuntu 18.04
libtorch v.1.0.0
OpenCV 3.2

I cloned the repo, created a build folder and used cmake .. , which went well.
When I use make, it gives me the following error:
cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/build
andik@andik-VirtualBox:/Schreibtisch/ML/libtorch-yolov3-deepsort/build$ make ..andik@andik-VirtualBox:/Schreibtisch/ML/libtorch-yolov3-deepsort/build$ make
Scanning dependencies of target detection
[ 5%] Building CXX object detection/CMakeFiles/detection.dir/src/Darknet.cpp.o
/home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:63:53: error: ‘torch::IntArrayRef’ has not been declared
torch::Tensor forward(torch::Tensor prediction, torch::IntArrayRef inp_dim) {
^~~~~
/home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp: In member function ‘at::Tensor DetectionLayerImpl::forward(at::Tensor, int)’:
/home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:72:38: error: invalid types ‘int[int]’ for array subscript
int64_t stride[] = {inp_dim[0] / grid_size[0], inp_dim[1] / grid_size[1]};
^
/home/andik/Schreibtisch/ML/libtorch-yolov3-deepsort/detection/src/Darknet.cpp:72:65: error: invalid types ‘int[int]’ for array subscript
int64_t stride[] = {inp_dim[0] / grid_size[0], inp_dim[1] / grid_size[1]};
^
detection/CMakeFiles/detection.dir/build.make:62: recipe for target 'detection/CMakeFiles/detection.dir/src/Darknet.cpp.o' failed
make[2]: *** [detection/CMakeFiles/detection.dir/src/Darknet.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'detection/CMakeFiles/detection.dir/all' failed
make[1]: *** [detection/CMakeFiles/detection.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Has anyone experienced the same error?
Best regards
Andi

会有挺多目标不会进行跟踪

您好 我使用yolov5作为检测器 但是发现检测到的目标特别多的时候 有挺大部分的bbox并不会进行追踪 请问这个要怎么调整呢 能否留个联系方式 我把源码发给你瞅瞅

如何调整跟踪参数?

首先感谢@weixu000做的很棒的工作!
我用yolov4+TensorRT+torch复现了这个项目,但我发现一个问题,在进行跟踪时,有时候tracker似乎并没有跟踪到目标。但是detector的检测是检测到的,并且置信度还挺高。而且看传给tracker的参数,也只是将rect传过去就可以,与置信度并无关系。
所以我想请教一下,应该如何调整跟踪参数,使得跟踪更加准确并且不会丢呢?
我看deepsort.cpp对iou_mat有一些阈值,是不是要调整这里?
麻烦您方便的时候给与解答
再次感谢@weixu000

cmake faied

it seems you reference the lib of libtorch and that makes this error ,but i am not sure how to fix this issue ,can you give me some help about this and i wil appreciate it.
CMake Error at /home/suning/libtorch/share/cmake/Caffe2/public/utils.cmake:16 (add_library):
add_library cannot create target "torch_library" because another target
with the same name already exists. The existing target is an interface
library created in source directory
"/home/suning/libtorch-yolov3-deepsort-master/detection". See
documentation for policy CMP0002 for more details.

how to build on windows 10

i downloaded all the and libs in Readme.txt , but i do not know how to build the project using cmake ,
what command should i write in command line ???
P.S.
i am new to cmake and all these stuff

@weixu000

Could not find "tracking_export.h"

Hi,
The works seem to be well nicely written. While I was trying to include just tracking module for my own project, I could not find "tracking_export.h". Is it missing or where can I get that?

lib torch安装

请问:你的libtorch是如何安装的,我直接使用编译好的库,会报错“add_library cannot create target "caffe2_library" because another target with the same name already exists”

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.