deep_sort icon indicating copy to clipboard operation
deep_sort copied to clipboard

Use Deep Sort to track trucks

Open Flock1 opened this issue 6 years ago • 9 comments

Hey guys, I want to know how can I use this to track trucks in a video. Should I replace this CNN with a CNN trained to detect trucks or re-train the CNN for trucks? Let me know

Flock1 avatar Oct 03 '18 05:10 Flock1

Hi @Flock1 go to yolo.py change the line if predicted_class != 'person' to if predicted_class != 'truck'

Akhtar303nu avatar Oct 03 '18 13:10 Akhtar303nu

But I want to track it. So how do I do that using deep sort? There's no YOLO implementation in deep sort

Flock1 avatar Oct 04 '18 09:10 Flock1

Sorry @Flock1 i have no idea about it but I want to count vehicle(car,bus,motorbyce ) how can I count it using deep sort any I dea or suggestion Thanks

Akhtar303nu avatar Oct 04 '18 10:10 Akhtar303nu

Hi, Is there any YOLO implementation in deep sort? I have trained a model consisting (a small video) on my custom dataset. I want to track few Objects will Deep Sort be useful for that?

buzdarbalooch avatar Nov 18 '18 12:11 buzdarbalooch

@buzdarbalooch Follow this https://github.com/Qidian213/deep_sort_yolov3

Akhtar303nu avatar Dec 20 '18 11:12 Akhtar303nu

Deep SORT uses an appearance descriptor that has been trained on a person re-identification dataset. You probably want to change that with something that has been trained on cars/trucks. If you have a dataset, the necessary steps would roughly look like this:

  • Train an appearance descriptor, e.g., using our code
  • Generate detections using the re-trained model
  • Tune Deep SORT hyperparameters

nwojke avatar Apr 30 '19 09:04 nwojke

HI @nwojke

I have a problem where I need to track exact looking objects (Color, appearance, you can say I tying to track same model bus ), So a reidentification model is no help at all here

So I was thinking maybe I should put more weight on kalam filters, , I see that we can change that using

D=Lambda∗Dk+(1−Lambda)∗Da

But I was not able to find the exact location in code where I can change this, so that it takes more weight on Kalman Mahalanobis distance, rather than on cosine distance, please help with this

But is this only way, is there any other way i can solve tracking of a similar-looking object

is there a different way i should train my reidentification model ?

if anyone has any ideas or solved similar problems, Please please share Thanks

PGCodehub avatar Jan 16 '20 06:01 PGCodehub

@nwojke hi i am trying to train the cosine metric learning model available in this repository https://github.com/nwojke/cosine_metric_learning with data set VeRi available in https://github.com/JDAI-CV/VeRidataset. I have followed some recommendations that you described in this repository https://github.com/nwojke/cosine_metric_learning/issues/5 carry out the training with this data set. I have tried to carry out the training with the data set as supplied without any modification in the files, however I have the following errors. `2020-07-05 21:43:25.232079: W tensorflow/core/framework/op_kernel.cc:1502] OP_REQUIRES failed at tensor_array_ops.cc:447 : Invalid argument: TensorArray map/TensorArray_1_0: Could not write to TensorArray index 1 because the value shape is [247,411,3] which is incompatible with the TensorArray's inferred element shape: [152,151,3] (consider setting infer_shape=False). EnqueueError: TensorArray map/TensorArray_1_0: Could not write to TensorArray index 1 because the value shape is [247,411,3] which is incompatible with the TensorArray's inferred element shape: [152,151,3] (consider setting infer_shape=False). [[node map/while/TensorArrayWrite/TensorArrayWriteV3 (defined at /content/gdrive/My Drive/Trainig_Cosenet/cosine_metric_learning-master/train_app.py:251) ]]

Errors may have originated from an input operation. Input Source operations connected to node map/while/TensorArrayWrite/TensorArrayWriteV3: map/while/DecodeJpeg (defined at /content/gdrive/My Drive/Trainig_Cosenet/cosine_metric_learning-master/train_app.py:250)

Original stack trace for 'map/while/TensorArrayWrite/TensorArrayWriteV3': File "train_veri.py", line 133, in main() File "train_veri.py", line 97, in main **train_kwargs) File "/content/gdrive/My Drive/Trainig_Cosenet/cosine_metric_learning-master/train_app.py", line 188, in train_loop trainable_scopes=trainable_scopes) . . .`

I wanted to ask you how the file folders should be or what modifications I have to make in order to carry out this training. In addition, the training will be done from scratch, there is no pre-training model that can be used for the transfer learning. or in which part can I enter the weights obtained with the data set "Market-1501-v15.09.15" so that the training does not take long time.

tanks you

jhonjam avatar Jul 05 '20 20:07 jhonjam

@nwojke Hi, I have some question on this issue, I want to ask that, is it possible to train the cosine metric model for both human and vehicle classes so that the deep sort model can track both human and car/trucks and etc? Have you ever tried to train different classes with combining multiple categories?

luvwinnie avatar Aug 19 '20 12:08 luvwinnie