insightface icon indicating copy to clipboard operation
insightface copied to clipboard

使用自制数据集训练时出错

Open enjoyloveless opened this issue 1 year ago • 3 comments

我想用 insightface 做一个 牛脸的认证, blazeface 训练成功了;但是;;;第二步;;;/home/aistudio/insightface/recognition/arcface_paddle !python tools/train.py
--config_file configs/ms1mv2_mobileface.py
--embedding_size 128
--sample_ratio 1.0
--loss ArcFace
--batch_size 5
--dataset MS1M_v2
--num_classes 54
--data_dir MS1M_v2/
--label_file MS1M_v2/label.txt
--fp16 False;;;报 File "/home/aistudio/insightface/recognition/arcface_paddle/dynamic/train.py", line 200, in train for step, (img, label) in enumerate(train_loader): raise ValueError('all input arrays must have the same shape') ValueError: all input arrays must have the same shape;;我已经把图片缩放为统一大小为啥还是会出现这个错;;;和embedding_size有关系吗

enjoyloveless avatar Mar 26 '24 04:03 enjoyloveless

在群里问道 如果使用飞桨 要把 分辨率统一调成112x112;;网络结构里都写死了,最后一个卷积是7x7

enjoyloveless avatar Mar 26 '24 06:03 enjoyloveless

Add transforms.Resize((112,112)) into dataset transform

airkid avatar Apr 15 '24 03:04 airkid

@enjoyloveless 你的环境是什么,能分享出来看看么,我的环境还运行不起

the-cat-crying avatar May 31 '24 02:05 the-cat-crying