deepinsight / deepinsight/insightface
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float' arcface_paddle recognition
- Dominant language
- Python
- Stars
- 29.7k
- Forks
- 6.1k
- PR merge metrics
- No merged PRs in 30d
Description
* I downloaded **MS1M_v3: MS1M-RetinaFace** dataset from https://github.com/deepinsight/insightface/tree/master/recognition/_datasets_ gdrive.
* Extract MXNet Dataset to images
`python tools/mx_recordio_2_images.py --root_dir ms1m-retinaface-t1/ --output_dir MS1M_v3/`
* After finishing unzipping the dataset, the folder structure is as follows.
```
MS1M_v3
|_ images
| |_ 00000001.jpg
| |_ ...
| |_ 05179510.jpg
|_ label.txt
|_ agedb_30.bin
|_ cfp_ff.bin
|_ cfp_fp.bin
|_ lfw.bin
```
* For Single Node, Single GPU Training, I ran the below script.
```
python tools/train.py \
--config_file configs/ms1mv2_mobileface.py \
--embedding_size 128 \
--sample_ratio 1.0 \
--loss ArcFace \
--batch_size 512 \
--dataset MS1M_v2 \
--num_classes 85742 \
--data_dir MS1M_v2/ \
--label_file MS1M_v2/label.txt \
--fp16 False
```
The above training script resulted in a TypeError, How can I fix this pls.
```
Exception in thread Thread-4:
Traceback (most recent call last):
File "c:\users\glodaris\appdata\local\programs\python\python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "c:\users\glodaris\appdata\local\programs\python\python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\Glodaris\OneDrive\Desktop\Glodaris\NIS\insight\insightface\lib\site-packages\paddle\fluid\dataloader\dataloader_iter.py", line 212, in _thread_loop
batch = self._dataset_fetcher.fetch(indices,
File "C:\Users\Glodaris\OneDrive\Desktop\Glodaris\NIS\insight\insightface\lib\site-packages\paddle\fluid\dataloader\fetcher.py", line 121, in fetch
data.append(self.dataset[idx])
File "C:\Users\Glodaris\OneDrive\Desktop\Glodaris\NIS\insight\Projects\insightface\recognition\arcface_paddle\datasets\common_dataset.py", line 69, in __getitem__
img = transform(img)
File "C:\Users\Glodaris\OneDrive\Desktop\Glodaris\NIS\insight\Projects\insightface\recognition\arcface_paddle\datasets\common_dataset.py", line 35, in transform
img = (img - 127.5) * 0.00784313725
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.