facebookresearch / SlowFast

PySlowFast: video understanding codebase from FAIR for reproducing state-of-the-art video models.
Apache License 2.0
6.39k stars 1.19k forks source link

How to fine-tune SlowFast Kinetics model #18

Open K3N60 opened 4 years ago

K3N60 commented 4 years ago

Hi, thank you for sharing the great code.

We try to fine-tune SlowFast Kinetics model with UCF101 dataset, could you provide fine-tune code? Thank you very much.

haooooooqi commented 4 years ago

Thanks a lot for using the code! I can prepare a finetune script for you. Also feel free to share your UCF data loader with the community.

K3N60 commented 4 years ago

Hello @takatosp1, thank you a lot for your help.

oLIVIa-Ld commented 4 years ago

Thanks a lot for using the code! I can prepare a finetune script for you. Also feel free to share your UCF data loader with the community.

fantastic work,we want to use this code in our dataset, we desperately want to use this code. thank you very much!!!

JameesWang commented 4 years ago

same question. @takatosp1 Thanks for your help !

oLIVIa-Ld commented 4 years ago

Hello @takatosp1, thank you a lot for your help.

have you received the finetune script?

K3N60 commented 4 years ago

have you received the finetune script?

No, not yet. I'm still waiting for the fine-tune script.

oLIVIa-Ld commented 4 years ago

have you received the finetune script?

No, not yet. I'm still waiting for the fine-tune script.

I think maybe you should reopen this issue, for sake of reminding this enhancement.

K3N60 commented 4 years ago

have you received the finetune script?

No, not yet. I'm still waiting for the fine-tune script.

I think maybe you should reopen this issue, for sake of reminding this enhancement.

Thank you for the notice. I'll reopen this issue.

haooooooqi commented 4 years ago

Hi, thanks for following up! I assume you have implemented the data loader and only asking for the finetune script. I have prepared the script, please share your email address below and I'll send you the yaml file.

oLIVIa-Ld commented 4 years ago

Hi, thanks for following up! I assume you have implemented the data loader and only asking for the finetune script. I have prepared the script, please share your email address below and I'll send you the yaml file.

thank you very much, my email: oliviald@126.com

haooooooqi commented 4 years ago

Have sent you the yaml file.

K3N60 commented 4 years ago

Hello, @takatosp1 Thank you so much, can I have finetune script?

batmanfightpredator commented 4 years ago

Hi, thanks for following up! I assume you have implemented the data loader and only asking for the finetune script. I have prepared the script, please share your email address below and I'll send you the yaml file.

thank you very much, my email: oliviald@126.com

would you send me the finetune script? my email:18829238406@163.com

anhminh3105 commented 4 years ago

Hi @takatosp1

Could you share the fine-tune script with me as well? my email is anhminh3105@gmail.com

Br.

ElainW commented 4 years ago

Hi @takatosp1

Do you mind sending me fine-tune script? My email is yilanwang@g.harvard.edu. Thanks in advance!

haooooooqi commented 4 years ago

Hi, Thanks everyone for using the codebase! The finetune script I shared with @oLIVIa-Ld is for her own task. Could everyone reply here to let me know what is the task (dataset) you are working on, and how would you want to perform "finetune" (only tune a fc layer, or tune the entire network), then I can commit an universal finetune script.

@ElainW @anhminh3105 @batmanfightpredator @K3N60

ElainW commented 4 years ago

@takatosp1 Thank you for your timely response. I'm trying to classify mouse behavior from video clips (not a standard dataset). I intend to use different action labels to classify much simpler behavior. I plan to start with tuning the fc layer, but may need to tune the entire network in the future.

DAVEISHAN commented 4 years ago

Hello @takatosp1, I want to finetune the SlowFast network on VIRAT dataset, which has 19 activity classes. Input Clip Length=64 frames and frame spatial resolution 112 x 112. I want to finetune the whole network. It would be very helpful in accelerating my research if you could share the finetuning script with me.

My email id is ishandave95@gmail.com

Regards, Ishan

batmanfightpredator commented 4 years ago

Hello @takatosp1 ,thanks for you response. I want to finetune SlowFast network on my own dataset, which has fewer categories. I want to finetune the fc layer first. Then see how it going.

bytecode-Ninja commented 4 years ago

Hi, thanks for following up! I assume you have implemented the data loader and only asking for the finetune script. I have prepared the script, please share your email address below and I'll send you the yaml file.

Hi , thanks for this awesome code base. I want to fine tune the kinetics on different datasets. Can you send the fine tune script to ali4426623@gmail.com

anhminh3105 commented 4 years ago

Hi, Thanks everyone for using the codebase! The finetune script I shared with @oLIVIa-Ld is for her own task. Could everyone reply here to let me know what is the task (dataset) you are working on, and how would you want to perform "finetune" (only tune a fc layer, or tune the entire network), then I can commit an universal finetune script.

@ElainW @anhminh3105 @batmanfightpredator @K3N60

Hi @takatosp1

If possible I would like to have you shared how to train and finetune slowfast on the AVA dataset for the action detection task, I am currently working on and am also researching it.

Thanks in advance. Br

Peratham commented 4 years ago

Hi @takatosp1 ,

I would like to request the finetuning script too.

Thank you. peratham@cs.umd.edu

Peratham commented 4 years ago

Hi @takatosp1 ,

I would like to request the finetuning script too.

Thank you. peratham@cs.umd.edu

I tried to implement a fixed-feature extractor from the slowfast model. I replace the last layer (self.head) with a new one that has a different number of classes. However, when I tried to train the new head, the accuracy on the dataset just saturated at 1/#CLASSES? I have tried many different initial learning rates {1,0.1,0.01,0.002,0.003,0.0003,0.00003} with Adam.

'''EDIT-1: By training it long enough, the accuracy seems to increase slowly to 2/#CLASSES in the second epoch... '''EDIT-2: The experiments were done by modifying the codebase from this repo. The official finetuning script might be different.

svakav commented 4 years ago

Hello @takatosp1, I would also like to fine-tune the SlowFast Kinetics model on the UCF-101 dataset. Could you send me the script? svajukiux@gmail.com Thank you

1529046970 commented 4 years ago

hi~ @takatosp1 ,thanks for your code! I would like to fine-tune the SlowFast Kinetics model on our own dataset to recognition some special action. could you send me the script to 13260850586@163.com Thank you very much~

lixzhang commented 4 years ago

Hi @takatosp1, can you share the fine-tune script with me? I want to train a model on my custom dataset to detect a small set of actions. Thank you. My email is lxzhang@gmail.com

chenneng commented 4 years ago

@takatosp1 I would like to request the finetuning script too. I want to train a model on my custom dataset to detect a small set of actions. Thank you very much. My email is: beiluo1990@vip.qq.com

JoseponLee commented 4 years ago

Hi, thanks for following up! I assume you have implemented the data loader and only asking for the finetune script. I have prepared the script, please share your email address below and I'll send you the yaml file.

thank you very much, my email: oliviald@126.com

@K3N60 @oLIVIa-Ld could you please share me the fine-tune script? I want to fine-tune the model on UCF101 dataset. thank you very much, my email is: joseponlee@gmail.com

zhiweizhong commented 4 years ago

@takatosp1 I also want to train a model on my own dataset, could you please share me the fine-tune script?. And my email is: zzwbeyond@gmail.com

ArmenGhambaryan commented 4 years ago

@takatosp1 could you please share the fine-tune script for my custom dataset as well? Thank you very much. My email is: aghambaryan@aua.am

JameesWang commented 4 years ago

Hi @takatosp1 @oLIVIa-Ld @K3N60, I would also like to fine-tune the SlowFast Kinetics model on the UCF-101 dataset. Could you send me the script? wangjianmin46@126.com Thank you very much !

chho-work commented 4 years ago

Hi@takatosp1, thanks for sharing the great work! I would like to finetune the HACS datasets on the entire network. I would appreciate if you could provide me with the appropriate script. Thanking you in advance! mail: chho.work@gmail.com

harshsp31 commented 4 years ago

Hi @takatosp1, Thank you for sharing this great work! I want to fine tune SlowFast Netowrk on a custom dataset with minimal tuning on the network. Preferably just the fc layers. Can you provide the script to me?

omaralvarez commented 4 years ago

Wouldn't sharing it through the repo be better? Or at least documentation on how to do it.

yushuinanrong commented 4 years ago

Hi @takatosp1 @oLIVIa-Ld @K3N60 Thank you for sharing this great work! I want to fine tune SlowFast Netowrk on a custom dataset for the last fc layer(s). Could you kindly send me a copy of the fine-tune code? My email: garychen@bu.edu

escorciav commented 4 years ago

Thanks for sharing the code.

Can't we just change the number of classes in the YML and pass the checkpoint pre-trained weights?

I did it. The log shows that everything except for the classifier was copied. BTW, the model is still training. I can't experimentally confirm that the bits in my question work in practice.

MODEL:
    NUM_CLASSES: 174

c.c. @takatosp1

ifeitao commented 4 years ago

Thanks for sharing the code.

Can't we just change the number of classes in the YML and pass the checkpoint pre-trained weights?

I did it. The log shows that everything except for the classifier was copied. BTW, the model is still training. I can't experimentally confirm that the bits in my question work in practice.

MODEL:
    NUM_CLASSES: 174

c.c. @takatosp1

Did this method work? thanks!

escorciav commented 4 years ago

I launched it, but haven't compiled the results :sweat_smile: Feel free to try it out, and if it works, invite me a :coffee: or a :beer: :wink: ... just kidding, I will give an update once I reviewed the training.

@yifeitao Do you know if there is any utility to parse the log file?

escorciav commented 4 years ago

@yifeitao I hope to review my log files later this week. However, the discussion in #111 regarding UCF suggest that what I said it is indeed the way to go.

gooners1886 commented 4 years ago

Hi @takatosp1, I'm trying to classify my own dataset which contains 50 action classes. There are 100-200 samples in each class. I plan to start with tuning the fc layer, but may need to tune the entire network in the future .Could you kindly send me a copy of the fine-tune code? My email is andyyang131124@gmail.com. thx!

escorciav commented 4 years ago

@yifeitao it seems that the procedure that I mentioned above works well. The SlowFast overfit pretty drastically in my case, but the accuracy in the validation set wasn't random.

We just need patience, and many GPUs to tweak the SlowFast to other datasets :sweat_smile:

sidney1505 commented 4 years ago

Hi! I would also be very thankful for the finetuning script. My goal is to apply PySlowFast to the Baum-1 emotion recognition dataset, which is about classifying videos of facial expressions into 7 classes of emotions. My mail is: "sidney.bender@student.kit.edu".

Best regards, Sidney

variousxin commented 4 years ago

Hi! @takatosp1 I also want to finetune slowfast at my own dataset, which has the similar format with UCF101 and contains the raw images extracted from video. I plan to finetune the entire network .Could you kindly send me a fine-tune code? My mail is: "gx_gaoxin@hotmail.com".

akh64bit commented 4 years ago

Hi @takatosp1 First of all thanks for making the awesome code available to all of us. Could you please send me the fine tuning script on akhilbussiness@gmail.com. I want to finetune on dataset that I have collected. The dataset is similar to UCF 101.

Thanks AK

chenyihang1993 commented 4 years ago

Hi! @takatosp1. I have finetuned slowfast based on gluoncv, but the accuracy looked strange. I guess it's because my training parameters are wrong. Could you kindly send me a fine-tune code? My mail is: "chenyihang199305@163.com".

imoko-tym commented 4 years ago

HI @takatosp1 @oLIVIa-Ld @K3N60 Thank you for sharing this great work! I want to fine tune SlowFast Netowrk on a custom dataset which contains 25 action classes for the last fc layer(s). Could you kindly send me a copy of the fine-tune code? My email address: m2030107@edu.cc.uec.ac.jp

sdjsngs commented 4 years ago

Hi @takatosp1 @oLIVIa-Ld @K3N60 I have some work on the UCF-101 and HMDB51 dataset . And i want to fine tune the network with the fc layer . And if it works for me , i will fine tune the whole network. Would you guys send me the related code? Thank you !!! my emaiil address : nbujacky@gmail.com or sdjsngs@163.om

fulqiao commented 4 years ago

Hi @takatosp1 @oLIVIa-Ld @K3N60, I would also like to fine-tune the SlowFast Kinetics model on the UCF-101 dataset. Could you send me the script? 1652665@tongji.edu.cn Thank you very much !

SantiHM23 commented 4 years ago

Hi! @takatosp1 I am trying to train the model on a custom dataset with 7 labelled actions, using the AVA checkpoint. From previous comments, I understood that just modifying the MODEL.NUM_CLASSES parameter would be enough, but then I get this error: RuntimeError: Error(s) in loading state_dict for SlowFastModel: size mismatch for head.projection.weight: copying a param with shape torch.Size([80, 2304]) from checkpoint, the shape in current model is torch.Size([7, 2304]). size mismatch for head.projection.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([7]). So I understand that it is not just by doing that, or maybe I have to modify something else. Anyone can give me a clue on this? In case there is no alternative than the finetune network, may you send it to me as well? Email: santiago.herrero@estudiante.uam.es Thank you very much!

Xiaolong-han commented 4 years ago

Hi @takatosp1, I'm trying to classify my own dataset which contains 500 classes. I plan to start with tuning the fc layer, but may need to tune the entire network in the future .Could you kindly send me a copy of the fine-tune code? My email is xiaolonghan5@gmail.com. thx!