weixu000 / libtorch-yolov3-deepsort Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
谁生成了,可以给我一个工程吗?或指导一下,感谢
Would you be able to share your ckpt.bin pre-trained weights?
ckpt.t7 from https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6 doesn't seem to be the same format as yours.
在做追踪的时候,bbox会在画面中存在前后帧飘移现象,但如果去掉跟踪,bbox是不会飘移的,说明检测器检测出来的bbox很好,应该是做跟踪的时候对bbox做了微调,请问是在哪做的?
你好, 我想知道你代码里的YOLO输入图像的形状是什么? 我看另一个PyTorch版本的输入图像会resize到(416, 416), 但是你的代码中没有这样处理. 输入图像形状对结果有影响吗
Igot the error "No rule to make target '/usr/local/cuda-10.0/lib64/libcuda.so"
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?
error: expected unqualified -id befor '[' token auto[max_cls_score,max_cls]=pred.slice(1,5).max(1);
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
When I test your repo i found that in line 72 of nn_matching.h have a trouble.
when you call nn_cosine_distance
if for loop (line 55), when i==0
, time taken by .cpu()
was >22000 micro second, but with other index, it took only 10-20 microseconds. If there is the way decrease that one, performance will increase dramatically.
测试deep sort的时候,相关路径下没有ckpt.bin(忘记下载了),tracker也可以正常工作,请问这种情况是没有用到特征提取的网络吗?
the fps i see in snapshot is 18, is the env diffenrence?
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 !!
我的显卡 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
你好。我参考closed掉的这个issue,把gcc升级到7.4,但是错误还是存在。为什么呢?我该怎么修改呢?谢谢!
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
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.
Is weights/ckpt.bin in Extractor.cpp same ckpt.t7 from https://drive.google.com/drive/folders/1xhG0kRH1EX5B9_Iz8gQJb7UNnn_riXi6 ?
When I rename to .bin and copy it in the weights directory I get a segmentation fault.
I am using Ubuntu 18.04 x86-64
Thanks so much
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
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并不会进行追踪 请问这个要怎么调整呢 能否留个联系方式 我把源码发给你瞅瞅
Does the model obtained through Python need to be converted before it can be used? How to convert?
Thank you, brother!
I want to train models on my custom datasets, and use your code to deploy.
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.
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
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?
请问:你的libtorch是如何安装的,我直接使用编译好的库,会报错“add_library cannot create target "caffe2_library" because another target with the same name already exists”
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.