benedettaliberatori / T3AL

Official implementation of "Test-Time Zero-Shot Temporal Action Localization", CVPR 2024
https://benedettaliberatori.github.io/T3AL/
41 stars 1 forks source link

Support for ANet #6

Closed jordisassoon closed 3 months ago

jordisassoon commented 4 months ago

Hi, I was wondering when you are planning to upload the anet config files, or how to generate them. As of now, in configs/experiments and configs/models I can only see support for THUMOS or the baseline.

Thanks

benedettaliberatori commented 3 months ago

Hi, thank you for your interest in our work! I have added those to the repo now.

jordisassoon commented 3 months ago

Thank you! I believe the anet files under configs/experiments are still missing. Furthermore, I saw the annotation paths are hardcoded instead of using the .yaml files. For example

self.annotations_path = "./data/thumos_annotations/thumos_anno_action.json"
self.video_dir = os.path.join(self.video_path, "Thumos14/videos/")

in src/models/components/tf_method.py and src/models/components/tt_method.py.

benedettaliberatori commented 3 months ago

Sure thanks. Now you can find those for anet as well. They are exactly the same of thumos, just changed every thumos in anet.

Regarding the annotation paths, they are not hardcoded but depend on how you set self.dataset, so they will change when you change the dataset from the config files.

self.annotations_path = (
                "./data/activitynet_annotations/anet_anno_action.json"
            )
self.video_dir = os.path.join(self.video_path, "ActivityNetVideos/videos/")

In the data folder of the repo you already have both annotation directories and files.

Hope this clears your doubts!

jordisassoon commented 3 months ago

It does seem that the path is hardcoded since regardless of my changes to video_path in anet.yaml it still looks for data in the ActivityNetVideos/videos directory. In my case I had the directory saved as ActivityNet/videos and I could not load the data. I noticed this since the first method to throw an error was get_video_fps in src/components/models/tt_method.py, and changing the lines I mentioned in the comment above fixes my issue.

Also, in the model file tt_anet.yaml, I think you are missing model. in:

dataset: ${model.dataset}
split: ${model.split}
setting: ${model.setting}

Thank you! 😄

Chaolei98 commented 3 months ago

Thanks for supporting config files in Anet. Using Anet config files, i achieve mAP around 5%. I would like to know the cause of the gap with the paper ( around 15%). Could it possibly be the fps which i directly get from "/data/activitynet_annotations/video_info_new.csv"? (no conditions to download ANet raw datasets). Thanks!

benedettaliberatori commented 3 months ago

Hi,

Yes @jordisassoon, sorry for the misunderstanding. The parent directory can be any, then the subdirectories should be Thumos14 or ActivityNetVideos. Indeed the directory name on GDrive is misleading. Also thanks for the missing model. !

@Chaolei98 what is the problem you have with downloading raw videos? I am not using the fps of that file because they are not accurate but approximate. I can provide you with the actual fps of the original videos in case. However, I don't think that's what's causing the difference. Could you tell me what command you use to get these results?

Chaolei98 commented 3 months ago

Hi, tanks for reply! @benedettaliberatori I can't access YouTube or Google Drive on my lab's terminal because it's in China. PC can achieve that via VPN, but download speeds are very slow.😵 I've failed to download v1-3_train_val.tar.gz many times due to internet instability. I would appreciate it if you could provide me with the exact fps file, my email is chaoleihan@seu.edu.cn. If the fps in the video_info_new.csv file is an approximation of the actual fps, I also don't think that's the cause of the performance difference. The command i used is python src/train.py experiment=tt_anet.yaml data=anet.yaml model.split=0 model.setting=75 data.nsplit=0 exp_name=anet.

benedettaliberatori commented 3 months ago

Hi! The command you are using is correct, the problem is that I had a minor difference for ActivityNet which I had removed during refactoring. Now I have updated the files and you should be able to obtain higher numbers. Please let me know if you still have problems and thanks again for the question.

Chaolei98 commented 3 months ago

You've fixed my problem, thanks!

Hi! The command you are using is correct, the problem is that I had a minor difference for ActivityNet which I had removed during refactoring. Now I have updated the files and you should be able to obtain higher numbers. Please let me know if you still have problems and thanks again for the question.

benedettaliberatori commented 3 months ago

Great to hear!