AutoTrain documentation

Image Scoring/Regression

You are viewing v0.8.8 version. A newer version v0.8.24 is available.
Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Image Scoring/Regression

Image scoring is a form of supervised learning where a model is trained to predict a score or value for an image. AutoTrain simplifies the process, enabling you to train a state-of-the-art image scoring model by simply uploading labeled example images.

Preparing your data

To ensure your image scoring model trains effectively, follow these guidelines for preparing your data:

Organizing Images

Prepare a zip file containing your images and metadata.jsonl.

Archive.zip
β”œβ”€β”€ 0001.png
β”œβ”€β”€ 0002.png
β”œβ”€β”€ 0003.png
β”œβ”€β”€ .
β”œβ”€β”€ .
β”œβ”€β”€ .
└── metadata.jsonl

Example for metadata.jsonl:

{"file_name": "0001.png", "target": 0.5}
{"file_name": "0002.png", "target": 0.7}
{"file_name": "0003.png", "target": 0.3}

Please note that metadata.jsonl should contain the file_name and the target value for each image.

Image Requirements

  • Format: Ensure all images are in JPEG, JPG, or PNG format.

  • Quantity: Include at least 5 images to provide the model with sufficient examples for learning.

  • Exclusivity: The zip file should exclusively contain images and metadata.jsonl. No additional files or nested folders should be included.

Some points to keep in mind:

  • The images must be jpeg, jpg or png.
  • There should be at least 5 images per class.
  • There must not be any other files in the zip file.
  • There must not be any other folders inside the zip folder.

When train.zip is decompressed, it creates no folders: only images and metadata.jsonl.

< > Update on GitHub