confifu / RepNet-Pytorch

Temporal repetition counting
40 stars 9 forks source link

model overfiting #1

Open qrsforever opened 3 years ago

qrsforever commented 3 years ago

Hello, when i train the model, after 35 epochs, the valid loss curve is as follows:

Screenshot from 2021-06-03 10-10-50

Can you give me some tips ?

confifu commented 3 years ago

What datasets and loss functions did you use? There is also UCFRep dataset.

qrsforever commented 3 years ago

@confifu

Used Countix Dataset:

train dataset: trainvids valid dataset: valvids test dataset: testvids

Loss:

SmoothL1Loss for period length

BCEWithLogitsLoss for periodicity

confifu commented 3 years ago

Given limited data, the model is bound to overfit. Use other datasets, the SyntheticDataset class implements the technique mentioned in the paper. There are some videos from kinetics dataset in the synthvid directory. I wrote the class so that it can take large single files as well, so you can put in any random long video files into it as well. Also compare the metrics (OBO and MAE) that you get with those of the paper. They are better indicator of model performance than absolute loss values.