alenzenx / TrackNetV3

Beyond TrackNetV2 ,and "First" TrackNet using Attention
52 stars 10 forks source link

Colab Notebook #6

Open RohaanA opened 4 months ago

RohaanA commented 4 months ago

Hi,

I wanted to try this model out and hence I created a colab notebook.

The notebook is functional as of now. You can use it to visualize how the model performs on your matches.

To me personally It was a little disappointing as it leaves the ball on the far side of the court. Currently I am using TracknetV1 with 3 frame mode and It does have a lot of false positives but it doesn't miss ball coordinates as much.

Colab Notebook

Here's the video I tried. If @alenzenx has any ideas on how I can improve the ball detection on the far side of the court I am all ears!

https://github.com/alenzenx/TrackNetV3/assets/75722072/4ae94284-40ec-4b83-8fc9-780711553656

alenzenx commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

RohaanA commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

alenzenx commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

You might need to research how to convert the dataset format or re-annotate, as the dataset format of TrackNetV1 is different from that of TrackNetV3.

RohaanA commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

You might need to research how to convert the dataset format or re-annotate, as the dataset format of TrackNetV1 is different from that of TrackNetV3.

Hey, following your idea I started training on the Tracknet V1 dataset after converting it.

image

However I am training on colab and one epoch will take approximately 1 hour 15 minutes, and since I am on the free tier my colab prob wont last more than a few hours. Can I train your model_best further? or save the model after 2-3 epochs and train it later?

RohaanA commented 4 months ago

Also um why does it say Model: TrackNetV2? I am using train.py from this repo so shouldn't it be V3? 😂

alenzenx commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

You might need to research how to convert the dataset format or re-annotate, as the dataset format of TrackNetV1 is different from that of TrackNetV3.

Hey, following your idea I started training on the Tracknet V1 dataset after converting it.

image

However I am training on colab and one epoch will take approximately 1 hour 15 minutes, and since I am on the free tier my colab prob wont last more than a few hours. Can I train your model_best further? or save the model after 2-3 epochs and train it later? You need save the model after 2-3 epochs and train it later,model_last.pt is the save of the previous epoch.

alenzenx commented 4 months ago

Also um why does it say Model: TrackNetV2? I am using train.py from this repo so shouldn't it be V3? 😂

I'm just too lazy to change the name of the class. The model structure of TrackNetV3 is in "model.py", the model structure of TrackNetV2 is in "model原始檔.py", and train.py calls model.py.

RohaanA commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

You might need to research how to convert the dataset format or re-annotate, as the dataset format of TrackNetV1 is different from that of TrackNetV3.

Hey, following your idea I started training on the Tracknet V1 dataset after converting it.

image

However I am training on colab and one epoch will take approximately 1 hour 15 minutes, and since I am on the free tier my colab prob wont last more than a few hours. Can I train your model_best further? or save the model after 2-3 epochs and train it later? You need save the model after 2-3 epochs and train it later,model_last.pt is the save of the previous epoch.

Thanks! I just noticed the --resume_training feature.

Also I think there is some bug in the denoise.py file. Gives me an index out of list error.

alenzenx commented 4 months ago

Hello, I am alenzenx. I have seen your colab notebook, and you seem to have used the pre-trained model I provided: model_best.pt. Since model_best.pt is a pre-trained model specifically for badminton and cannot be used directly for tennis, if your data set is tennis, you must re-label the data set and re-train. The pre-training model of TrackNetV1 is specifically For tennis, if you use TrackNetV3 to retrain a pre-training model specifically for tennis, the effect will be better than TrackNetV1. The data set annotation methods for badminton and tennis are the same.

Can I use the same dataset used to train TrackNet V1?

You might need to research how to convert the dataset format or re-annotate, as the dataset format of TrackNetV1 is different from that of TrackNetV3.

Hey, following your idea I started training on the Tracknet V1 dataset after converting it.

image

However I am training on colab and one epoch will take approximately 1 hour 15 minutes, and since I am on the free tier my colab prob wont last more than a few hours. Can I train your model_best further? or save the model after 2-3 epochs and train it later?

You need save the model after 2-3 epochs and train it later,model_last.pt is the save of the previous epoch.

Thanks! I just noticed the --resume_training feature.

Also I think there is some bug in the denoise.py file. Gives me an index out of list error.

The original predict.py and denoise.py were written by another team. The problem might be that there are duplicate frames recorded in the csv file generated by predict.py. You could try writing a small program to detect whether there are duplicate frames, and if there are, delete the duplicates. Perhaps then, denoise.py will run successfully.