cosine_metric_learning icon indicating copy to clipboard operation
cosine_metric_learning copied to clipboard

Tracking drones with deepsort

Open ngingihy opened this issue 5 years ago • 15 comments

Great repo! For training on a custom drone dataset. I already have yolov3-tiny weight files trained on my own custom dataset for drones that I want to use with deep sort model for tracking drones but it looks like I need to do another training for cosine metric learning, I just need to confirm if that's right? also if this is correct, can you just mention the detailed steps for training on a custom dataset. It would really be beneficial for everyone and will greatly appreciate it!

ngingihy avatar Jun 12 '19 14:06 ngingihy

I could not be more agree with ngingihy. Could you please give some detail steps for training on a custom dataset?

TongJiL avatar Jul 03 '19 17:07 TongJiL

Looking for training guidance, too. Since I hope to train the MOT17 dataset by Deep SORT

lsmh886 avatar Jul 06 '19 07:07 lsmh886

Hi ngingihy,

it is correct that you need to to train on a custom dataset for your application. The steps are roughly (1) get dataset, (2) write a dataset adapter similar to the existing ones in datasets/, (3) adapt one of the train_[dataset].py scripts to your needs.

I cannot help with (1) and (2) since it is specfic to the structure of your custom dataset, but it should be quite straight-forward since you will mainly have to read images and object IDs. Take a look at the existing code for reading MARS and Market1501 and write functions which return the same data. Step (3) should be mostly copy and paste.

This is only very broad information, but I hope it helps nonetheless.

nwojke avatar Jul 10 '19 07:07 nwojke

Hi @nwojke ,

Thanks that was really helpful! I was able to start the training part. However, for the evaluation mode, i get the following error "ValueError: input must have last dimension >= k = 5 but is 2 for 'TopKV2_1' (op: 'TopKV2') with input shapes: [2,2], [] and with computed input tensors: input[1] = <5>".

I have a dataset of 28000 images and 20 IDS, each ID has 140 images. I tried changing the k list in eval_loop in the train_app.py "[1, 5, 10, 20]" to only "[1,5]" and "[1, 5, 10]" and I still got the same error. I changed the list to just [1] and it worked! But the precision_1 graph keeps decreasing

image

ngingihy avatar Jul 11 '19 20:07 ngingihy

Great to hear that you made progress. I haven't seen the error before. It would be great if you tell me where it occurs.

nwojke avatar Jul 19 '19 20:07 nwojke

It occurs when I run the following command for evaluation "train_d.py --mode=eval --dataset_dir=./d-dataset/ --loss_mode=cosine-softmax --log_dir=./output/ddd/ --run_id=cosine-softmax --eval_log_dir=./eval_output/dddd"

However, I got it to work by adjusting the cmc metric list from [1, 5, 10, 20] to only [1]. Also, I don't know when to stop training since the precision_1 value in graph keeps decreasing. Does that mean the training is going right?

Note: I have a dataset of 28000 images and 20 IDS, each ID has 140 images. I tried changing the k list in eval_loop function in the train_app.py "[1, 5, 10, 20]" to only "[1,5]" and "[1, 5, 10]" and I still got the same error. I changed the list to just [1] and it worked! But the precision_1 graph keeps decreasing

ngingihy avatar Jul 22 '19 16:07 ngingihy

I have about 2800 images, not 28000.

ngingihy avatar Jul 30 '19 17:07 ngingihy

I also want to track drones with deepsort, could you tell me how to train it and what is the input for the train? I will be very greatful to you.

cat1437-6 avatar Jul 31 '19 08:07 cat1437-6

@ngingihy ,Have you successfully trained on a custom drone datasets

chrenlily avatar Jan 03 '20 06:01 chrenlily

i had an errot while evaluating : ValueError: elems must be a 1+ dimensional Tensor, not a scalar any solutions ??

SpawN1337 avatar Apr 09 '20 08:04 SpawN1337

@ngingihy Could you please share which video annotation tool you have used? Also, could you solve the problem? I am going to follow a similar procedure for a different dataset. Thanks in advance.

utkutpcgl avatar May 19 '20 14:05 utkutpcgl

@ngingihy can you share the detailed steps of training your own models, it would be really grateful for all of us.

akashAD98 avatar May 18 '21 11:05 akashAD98

Ok, I will setup a github and google collab for this.

seahawks8 avatar May 18 '21 20:05 seahawks8

@seahawks8 Thanks. we are waiting for your project.

akashAD98 avatar May 20 '21 03:05 akashAD98

Hi @nwojke ,

Thanks that was really helpful! I was able to start the training part. However, for the evaluation mode, i get the following error "ValueError: input must have last dimension >= k = 5 but is 2 for 'TopKV2_1' (op: 'TopKV2') with input shapes: [2,2], [] and with computed input tensors: input[1] = <5>".

I have a dataset of 28000 images and 20 IDS, each ID has 140 images. I tried changing the k list in eval_loop in the train_app.py "[1, 5, 10, 20]" to only "[1,5]" and "[1, 5, 10]" and I still got the same error. I changed the list to just [1] and it worked! But the precision_1 graph keeps decreasing

image

could u tell me the detail about the train of the deepsort on the MOTdataset,please,pretty thanks!!!!!

JAYCHOU2020 avatar Jul 28 '21 07:07 JAYCHOU2020