cosine_metric_learning
cosine_metric_learning copied to clipboard
Tracking drones with deepsort
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!
I could not be more agree with ngingihy. Could you please give some detail steps for training on a custom dataset?
Looking for training guidance, too. Since I hope to train the MOT17 dataset by Deep SORT
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.
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
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.
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
I have about 2800 images, not 28000.
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.
@ngingihy ,Have you successfully trained on a custom drone datasets
i had an errot while evaluating : ValueError: elems must be a 1+ dimensional Tensor, not a scalar any solutions ??
@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.
@ngingihy can you share the detailed steps of training your own models, it would be really grateful for all of us.
Ok, I will setup a github and google collab for this.
@seahawks8 Thanks. we are waiting for your project.
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
could u tell me the detail about the train of the deepsort on the MOTdataset,please,pretty thanks!!!!!