unilm icon indicating copy to clipboard operation
unilm copied to clipboard

Fine-tuning BEATs for ESC50 classification.

Open e871223eeee opened this issue 2 years ago • 8 comments

I'm trying to replicate your experiment on fine-tuning for ESC50 classification, but I'm experiencing a significant accuracy gap. I'm using the pre-trained model "BEATs_iter3" and I can't achieve an accuracy of 95.6%. In fact, it's not even reaching 90%. I would like to request your code for this task or any specific details that I should pay special attention to. Thank you for your assistance, and I appreciate your prompt response. 螢幕擷取畫面 2023-06-03 203007

e871223eeee avatar Jun 03 '23 12:06 e871223eeee

Having same problem here

Derdin-datascience avatar Jun 21 '23 16:06 Derdin-datascience

Any ideas about how to re-train (or fine-tune) a pre-trained model for a specific dataset? Many thanks.

jmren168 avatar Jun 26 '23 06:06 jmren168

Hello @e871223eeee! Have you made sure to use torch.no_grad() to freeze layers preceding the final layer? If not you could be accidentally retraining on ESC-50 instead of fine tuning to it which could potentially explain the mismatch in accuracy.

Adamwewe avatar Jun 26 '23 11:06 Adamwewe

@e871223eeee https://github.com/NINAnor/rare_species_detections/tree/main/BEATs_on_ECS50 maybe that could help

jromerooo2 avatar Jul 17 '23 20:07 jromerooo2

@jromerooo2 thanks for sharing our repo! However the link is broken and the correct one is now: https://github.com/NINAnor/rare_species_detections/tree/main/BEATs_on_ESC50

A few things:

  • We recently made some changes in the repo
  • The repo is fully Dockerized and self-contained (you don't need to download BEATs or the ESC50 dataset) so you should be able to run it without problems (I tested it on different Linux distribution)
  • We find that training only the last fully connected layer yield better results than training the full architecture (last FC layer + BEATs)

If you have any problem running our code do not hesitate to open an issue :)

BenCretois avatar Oct 10 '23 09:10 BenCretois

I would like to ask if I want to further input the extracted features into the resnet18 pre-trained model for further feature mining, I found that the loss cannot be reduced in this way. Please help me.

RyunosukeYuu avatar May 29 '24 11:05 RyunosukeYuu