qidian213 / deep_sort_yolov3 Goto Github PK
View Code? Open in Web Editor NEWReal-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
License: GNU General Public License v3.0
Real-time Multi-person tracker using YOLO v3 and deep_sort with tensorflow
License: GNU General Public License v3.0
Hi,"mars-small128.pb" model file is trained with the person re-identification dataset right? If yes is it okay to use this model for some other objects on which we want to run the tracking?
I want to use the original darknet yolov3 instead of the keras yolov3.
I'm having trouble adapting bounding boxes.
I want to replace the bounding box outputs of this file: https://github.com/Qidian213/deep_sort_yolov3/blob/master/demo.py#L58
With the bounding box outputs of this function (in darknet yolov3 python bindings): https://github.com/AlexeyAB/darknet/blob/master/darknet.py#L281
I'm following the chain of function calls and transformations, but I'm still not quite getting it.
What do the four coordinates inside each of the boxs represent?
How can I use TensorRT for this code?
Thanks
你好,我跑了你的项目之后,用本地的视频,发现视频中行人轨迹的ID经常变化,这个问题再deep sort项目中也报过issue ,我尝试把你demo中可视化的那个循环修改后问题同样存在。
环境Ubuntu16.04,python2.7
issue 参照
nwojke/deep_sort#13
里面貌似@Bendidi用的可视化的代码和你类似 是用一个循环写的
update:
在循环内跟踪框之前 加一条判断语句就可以了,
if track.is_confirmed() and track.time_since_update <=0:
hello ~
I run demo.py on my server but something goes wrong...
(AttributeError: can't set attribute)
python version: 2.7.6
tensorflow version: 1.4.0
keras version: 2.0.6
I don't know why it happened, would you help me?
Thank you very much!
(It seems to use CPU rather than GPU, but anyway, my cuda version is 9.2.148 and no cudnn.)
=============== the error information is shown below=================
Using TensorFlow backend.
Loading weights.
('Weights Header: ', 0, 2, 0, array([32013312]))
Parsing Darknet config.
Creating Keras model.
Parsing section net_0
Parsing section convolutional_0
('conv2d', 'bn', u'leaky', (3, 3, 3, 32))
Traceback (most recent call last):
File "convert.py", line 241, in
_main(parser.parse_args())
File "convert.py", line 170, in _main
padding=padding))(prev_layer)
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 560, in call
File "build/bdist.linux-x86_64/egg/keras/layers/convolutional.py", line 134, in build
File "build/bdist.linux-x86_64/egg/keras/legacy/interfaces.py", line 87, in wrapper
File "build/bdist.linux-x86_64/egg/keras/engine/topology.py", line 384, in add_weight
File "build/bdist.linux-x86_64/egg/keras/backend/tensorflow_backend.py", line 323, in variable
AttributeError: can't set attribute
@Qidian213
can i use this implementation for detection only ?
Got the following during training;
Traceback (most recent call last):
File "convert.py", line 241, in
_main(parser.parse_args())
File "convert.py", line 78, in _main
unique_config_file= unique_config_sections(config_path)
File "convert.py", line 48, in unique_config_sections
output_stream.write(line)
TypeError: a bytes-like object is required, not 'str'
I want to check the performance of this deep sort?
How can I can do that
Thanks
Hello, first of all, thank you for your hard work.
I've trained Yolo v3 model for the custom object(person, logo on the shirt) detection. After I convert it to h5 file. and run demo.py it throws error.
File "/home/deep_sort_yolov3/yolo.py", line 33, in init
self.boxes, self.scores, self.classes = self.generate()
File "/home/deep_sort_yolov3/yolo.py", line 72, in generate
score_threshold=self.score, iou_threshold=self.iou)
File "/home/deep_sort_yolov3/yolo3/model.py", line 170, in yolo_eval
anchors[anchor_mask[l]], num_classes, input_shape, image_shape)
IndexError: index 6 is out of bounds for axis 0 with size 6
Exception ignored in: <bound method BaseSession.del of <tensorflow.python.client.session.Session object at 0x7f36234d45f8>>
Traceback (most recent call last):
File "/home/.virtualenvs//lib/python3.5/site-packages/tensorflow/python/client/session.py", line 707, in del
TypeError: 'NoneType' object is not callable
After going through issues I see yolo.py is using coc_classes.txt and yolo_anchors.txt files. I manually edited the coco_classes.txt and added the name of custom object(person, logo) I'm looking to detect.
I am stuck at yolo_anchors.txt and voc_classes.txt file how can I edit them to get the detection +tracking.
I gathered people's images and learned with YOLOv3 as one class problem.
(./darknet detector train data/obj.data yolov3.cfg darknet53.conv.74)
The weights of the learning result were better than yolov3.weights in YOLOv3.
Then I converted the weights in convert.py of deep_sort_yolov3 and corrected yolo_anchors.txt and coco_classes.txt appropriately.
However, the tracking success rate of deep_sort_yolov 3 got worse than when using default yolov3.weights(yolo.h5).
Can you think of anything as a cause?
Hello, I find the λ in the paper of deep-sort is 0 . Is it 0 too in the code? I haven't found the place to set the λ .
Thanks can i use this code for vehicle counting?
Or use this code for tracking more than one object at a time (car,bus.truck)
Thanks for your work, the tracking is amazing, but I need your help to improve the speed.
I use a gtx1080ti to run this demo.
The gpu usage rate only 15%-20%, and the memory occupancy rate is only 7%.
How to make full use of GPU?
Hi , i run the original deep_sort code(using the detections provided) and this code(deep_sort_yolov3) on the test video (MOT16-06.mp4), the former's accuracy is higher, is it the problem of detection phase? Or the original deep_sort use the MOT16 training dataset to train? They both use the mars-small128 pretrained model after all. thanks in advance……
First of all great job! This was most useful.
Any pointers on how to change this tracker from people to cars?
你好 看到您的关于deep-sort yolov3的文章,下载下来不能正常运行显示报错,Windows 下
Input to reshape is a tensor with 3549 values, but the requested shape requires a multiple of 43095
[[Node:Reshape_75=Reshape[T=DT_FLOAT,Tshape=DT_INT32,_device="/job:localhost/replica:0/task:0/device:CPU:0"](conv2d_59_4/BiasAdd, Reshape_75/shape)]]
一直没有找到问题的根源 特别写了这封邮件 寻求您的帮助,希望您给一些详细的使用教程 期待您的回复。 谢谢
Hi @Qidian213 I want to convert frozen graph of this model to tensorRt Engine.
Have you done this? if you have done please share the script
other wise please provide me
config file and , checkpoint file of this project
Thanks
How
I can't figure out how to totally silence the loading stdout when I load the Tensorflow-based feature extractor.
Here is what I can't get rid of:
Optimizing fused batch norm node name: "net/conv4_3/1/conv4_3/1/bn/FusedBatchNorm"
op: "FusedBatchNorm"
input: "net/conv4_3/1/Conv2D"
input: "net/conv4_3/1/conv4_3/1/bn/Const"
input: "net/conv4_3/1/conv4_3/1/bn/beta"
input: "net/conv4_3/1/conv4_3/1/bn/moving_mean"
input: "net/conv4_3/1/conv4_3/1/bn/moving_variance"
device: "/job:localhost/replica:0/task:0/device:GPU:0"
attr {
key: "T"
value {
type: DT_FLOAT
}
}
attr {
key: "data_format"
value {
s: "NHWC"
}
}
attr {
key: "epsilon"
value {
f: 0.001
}
}
attr {
key: "is_training"
value {
b: false
}
}
I've added the following verbosity variables to the top of the generate_detections.py
file. I've tried many combination of settings but nothing has worked.
import os
os.environ['TF_CPP_MIN_VLOG_LEVEL'] = '0'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from tensorflow import logging
logging.set_verbosity(logging.FATAL)
What else can I try?
Hi again
Is there are way to get the tracks in a text file.
Hello,I would like to know that if there is anyone working actively on the improvement of this tracker?
I am getting this while running the demo.py
2018-05-22 21:18:25.932086: W tensorflow/core/common_runtime/bfc_allocator.cc:279] ****************************************************************************************************
2018-05-22 21:18:25.932128: W tensorflow/core/framework/op_kernel.cc:1318] OP_REQUIRES failed at assign_op.h:112 : Resource exhausted: OOM when allocating tensor with shape[512] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
Hi I am trying to adapt the convert.py script to convert maxpool layer for supporting TinyYolo v3. How exactly do you go about doing this?
hello!
在程序demo.py第76行
if track.is_confirmed() and tarck.time_since_updata>1
不应该是 if not track.is_confirmed() and tarck.time_since_updata>1 吗?
但是我改了之后效果变得很差
请问您有什么解决方法吗
how can we add the object name to the bounding box instead of the track id??
Hi Qidian213, great work!
Could you add some arguments to download tracking csv file and the video with the bounding boxes?
Thank you
Hi!
I was wondering if it is possible to enter multiple cameras and/or multiple video input at once.
If not, what should be a smart idea of implementing it.
With those two cameras I want to determine the exact position of an object/multiple objects.
Cheers,
Hello!
your FPS is about 11~13,what's your environment?
have you tested on jetson TX2?
Hi
I tested the video. The results are very bad.
Its only 6 seconds after start of video.
There are only 6 people but the track number is 17.
Even the boxes are not on people.
Second image is from yolov3 on keras
while run the following python program, it is said as the following, could you try to fix it?
python convert.py yolov3.cfg yolov3.weights model_data/yolo.h5
D:\dev\IDE\Anaconda3\lib\site-packages\h5py_init_.py:36: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Loading weights.
Weights Header: 0 2 0 [32013312]
Parsing Darknet config.
Traceback (most recent call last):
File "convert.py", line 241, in
_main(parser.parse_args())
File "convert.py", line 78, in _main
unique_config_file = unique_config_sections(config_path)
File "convert.py", line 48, in unique_config_sections
output_stream.write(line)
TypeError: a bytes-like object is required, not 'str'
can we give the link of input video through command line instead of hardcoding
@Qidian213
Can u please let me know how did u manage to detect and track in real time....
because even the darknet implementation of yolov3 is not realtime on CPU it gives 0.4 fps on CPU that too for detection only... While your implementation gives me speed of 2.4 fps with detection as well as tracking on CPU
hi, @Qidian213 .
I am using your code to do the tracking with tin-yolo model. Current I could get around 3-4 fps on cpu. I want to improve that. However, I found that the line 60 in demo.py which is "features = encoder(frame,boxs)" take 100 ms for 1 image, which waste a lot of time. I want to ask whether there has a way to improve this? Thank you!
I have finished tracking my first video, it goes wrong when i want change my tracking video. Is anyone's issue is same as me? then i turned to tracking the former video, it's okay to detect and tracking, but it's going wrong when i turned to try the second video,then i try another video, it's failed again.
Hi everyone,
Thanks for this code. I would like to know whether anybody have deep sort vehicle class weights for vehicle class like cars, trucks etc.?
Please share weights for relevant procedure to train our own set of weights?
Thanks!!
TypeError: a bytes-like object is required, not 'str'
Hello
I runned demo.py
but it looked only cpu only.
how can I change it?
thank you +
inside nn_matching.py i see that the features and corresponding track ids are stored inside samples dict.
Is there a way to save those features as image files?
First of all, thanks for sharing this project! :)
I tried to run the tracker on a PTZ Optics camera by changing the following line of demo.py:
video_capture = cv2.VideoCapture(0)
to
video_capture = cv2.VideoCapture('rtsp://[IP]/1')
where [IP] is the IP address of the camera. When I run demo.py the capture window opens, but freezes on the first frame. What could be the problem?
Thanks and best regards!
Hi,
Thanks a lot for your work, very helpful. It's work great on some videos. I am working on 1fps camera and its doesn't work well, as expected. Persons create a new id at each footstep. I think it's due to the very low fps, person look like teleporting. Maybe the velocity model of the kalman filter sould be changed.
Do you know how can i manage this by modifying some value ?
What the mean of nms_max_overlap and nn_budget ?
Thanks
Hi,
I'm unable to convert the Darknet model to a Keras model. I'm getting the following error:
Using TensorFlow backend.
Loading weights.
Weights Header: 0 2 0 [32013312]
Parsing Darknet config.
Traceback (most recent call last):
File "convert.py", line 241, in <module>
_main(parser.parse_args())
File "convert.py", line 78, in _main
unique_config_file = unique_config_sections(config_path)
File "convert.py", line 48, in unique_config_sections
output_stream.write(line)
TypeError: a bytes-like object is required, not 'str'
Any idea on how to solve this? Thanks.
怎么安装sklean???
Hi, I'm running this code on my CPU machine. How do I make it run on the GPU ? Maybe I'm missing something but couldn't find a documentation on how to do it. I have CUDA and CUDNN installed. Thanks
I found the demo only deal one image when inference? How could I input multi images just like train?
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.