L2CS-Net icon indicating copy to clipboard operation
L2CS-Net copied to clipboard

train bug

Open zpz915 opened this issue 1 year ago • 9 comments

python train.py \

--dataset mpiigaze
--snapshot output/snapshots
--gpu 0
--num_epochs 50
--batch_size 16
--lr 0.00001
--arch ResNet101
--alpha 1 Loading data. 45000 items removed from dataset that have an angle > 0 Traceback (most recent call last): File "train.py", line 276, in train_loader_gaze = DataLoader( File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 268, in init sampler = RandomSampler(dataset, generator=generator) File "/root/miniconda3/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 102, in init raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0

zpz915 avatar Jul 19 '24 01:07 zpz915

i read the code,find dataset=Mpiigaze(testlabelpathombined,args.gazeMpiimage_dir, transformations, True, fold) give 5 paramters ,but class Mpiigaze(Dataset): def init(self, pathorg, root, transform, train, angle,fold=0): accept 6 paramters ,is there any bug?

zpz915 avatar Jul 19 '24 01:07 zpz915

when i guess angel=180,the train also meet other bug: Traceback (most recent call last): File "train.py", line 299, in {'params': get_ignored_params(model, args.arch), 'lr': 0}, TypeError: get_ignored_params() takes 1 positional argument but 2 were given

zpz915 avatar Jul 19 '24 02:07 zpz915

hi @zpz915 , have you succeeded training the model. I am also facing the same issue.

yakhyo avatar Aug 05 '24 06:08 yakhyo

Same issue here, any solutions ?

forlayo avatar Aug 19 '24 14:08 forlayo

@forlayo , I succeeded training Gaze360 and going to release it soon and adding mobilenet new backbone as well.

yakhyo avatar Aug 20 '24 01:08 yakhyo

I tried to download the dataset but it seems like the dataset is too big, can anyone split the dataset for me around 5gb so I can download it?

tiamo405 avatar Aug 22 '24 07:08 tiamo405

@tiamo405 , MPIIFaceGaze is relatively smaller than Gaze360.

yakhyo avatar Aug 23 '24 01:08 yakhyo

@tiamo405 , MPIIFaceGaze is relatively smaller than Gaze360.

MPIIFaceGaze not folder Label, link download: https://www.mpi-inf.mpg.de/departments/computer-vision-and-machine-learning/research/gaze-based-human-computer-interaction/its-written-all-over-your-face-full-face-appearance-based-gaze-estimation

tiamo405 avatar Aug 26 '24 04:08 tiamo405

link folder 940Mb: http://datasets.d2.mpi-inf.mpg.de/MPIIGaze/MPIIFaceGaze.zip

tiamo405 avatar Aug 26 '24 04:08 tiamo405

I have identified and resolved issues in the code, and understand why using the Gaze360 dataset can result in successful training while using the MPIIFaceGaze dataset reports errors. This is because MPIIFaceGaze data processing lacks an angle parameter, and all data with angles less than 0 degrees are filtered out.

ipsampling avatar Nov 17 '24 08:11 ipsampling

我已经识别并解决了代码中的问题,并了解了为什么使用 Gaze360 数据集可以成功训练,而使用 MPIIFaceGaze 数据集报告错误。这是因为 MPIIFaceGaze 数据处理缺少 angle 参数,所有角度小于 0 度的数据都会被过滤掉。

Hello, so how did you solve the problem, just delete the parameter or add the code to handle the angle parameter?

NuoZ avatar Dec 06 '24 03:12 NuoZ

@NuoZ , i resolved the problem and reproduced some of the results.

yakhyo avatar Dec 06 '24 03:12 yakhyo

我已经识别并解决了代码中的问题,并了解了为什么使用 Gaze360 数据集可以成功训练,而使用 MPIIFaceGaze 数据集报告错误。这是因为 MPIIFaceGaze 数据处理缺少 angle 参数,所有角度小于 0 度的数据都会被过滤掉。

您好,那么您是怎么解决问题的,只是删除参数还是添加代码来处理 angle 参数呢? like this dataset=Mpiigaze(testlabelpathombined,args.gazeMpiimage_dir, transformations, True,180, fold)

ipsampling avatar Dec 06 '24 04:12 ipsampling

Sorry. This is my first pull request, so I was a bit clumsy. Please feel free to look at my commit.

shojint avatar Jan 01 '25 07:01 shojint