ZhaoJ9014 / face.evoLVe

🔥🔥High-Performance Face Recognition Library on PaddlePaddle & PyTorch🔥🔥
MIT License
3.44k stars 759 forks source link

Database Formatting - Urgent Help! #123

Open N0ODle opened 4 years ago

N0ODle commented 4 years ago

Can anyone show me how to correctly format the database folder because I keep running into errors.

Traceback (most recent call last):
  File "train.py", line 70, in <module>
    dataset_train = datasets.ImageFolder(os.path.join(DATA_ROOT, 'imgs'), train_transform)
  File "/Users/royce.moon/evoLVeTest/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 206, in __init__
    is_valid_file=is_valid_file)
  File "/Users/royce.moon/evoLVeTest/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 94, in __init__
    classes, class_to_idx = self._find_classes(self.root)
  File "/Users/royce.moon/evoLVeTest/lib/python3.7/site-packages/torchvision/datasets/folder.py", line 121, in _find_classes
    classes = [d.name for d in os.scandir(dir) if d.is_dir()]
FileNotFoundError: [Errno 2] No such file or directory: '/Volumes/storage/"Deep Learning"/data/imgs'
congheng commented 4 years ago

the DATA_ROOT is root for your dataset and 'img' change for 'lfw' and so on

sriktrako commented 3 years ago

Hi @N0ODle @congheng, I am trying to train a dataset, I am not able to figure out the data format required for training, currently my data is inside

D:/face.evoLVe.PyTorch/data/dataV1/ Inside dataV1 directory the data is as follows: -> id1/ -> 1.jpg -> ... -> id2/ -> 1.jpg -> ... -> ... -> ... -> ... Data is already aligned, resized to 112 using the align script provided in repo. When I run train.py, I am getting file not found error, I saw lot of people are facing the same issue, not being able to get the correct data format.

It would help a lot of people if you can guide how to get the correct dataset format for training. Help would be much appreciated, thank you.