CaptchaAgent / hcaptcha-model-factory

🏗 hCaptcha image label binary model factory (PyTorch Training, Cluster-based Auto Label Tools, Export ONNX model, ONNX model inference)
GNU General Public License v3.0
72 stars 18 forks source link

Validation: Split Error #5

Closed Vinyzu closed 2 years ago

Vinyzu commented 2 years ago

Im getting this error:

Traceback (most recent call last):
  File "C:\Users\admin\Documents\GitHub\hcaptcha-model-factory\src\main.py", line 227, in <module>
    val()
  File "C:\Users\admin\Documents\GitHub\hcaptcha-model-factory\src\main.py", line 159, in val
    data = torchvision.datasets.ImageFolder(
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\datasets\folder.py", line 310, in __init__
    super().__init__(
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\datasets\folder.py", line 146, in __init__
    samples = self.make_dataset(self.root, class_to_idx, extensions, is_valid_file)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\datasets\folder.py", line 190, in make_dataset
    return make_dataset(directory, class_to_idx, extensions=extensions, is_valid_file=is_valid_file)
  File "C:\Users\admin\AppData\Local\Programs\Python\Python310\lib\site-packages\torchvision\datasets\folder.py", line 103, in make_dataset
    raise FileNotFoundError(msg)
FileNotFoundError: Found no valid file for the classes 0, 1. Supported extensions are: .jpg, .jpeg, .png, .ppm, .bmp, .pgm, .tif, .tiff, .webp

When trying to validate my onnx model. I tried splitting the data before, using another path, nothing worked.

Vinyzu commented 2 years ago

Update: You have to split the data whilst validating. I will make a pull request, which only allows the data to be validated without training first.

Vinyzu commented 2 years ago

Pull Request: https://github.com/beiyuouo/hcaptcha-model-factory/pull/6