-
Notifications
You must be signed in to change notification settings - Fork 507
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d568c9
commit f1f9040
Showing
28 changed files
with
1,036 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
task: image_classification | ||
base_model: google/vit-base-patch16-224 | ||
project_name: autotrain-image-classification-model | ||
log: tensorboard | ||
backend: local | ||
|
||
data: | ||
path: data/ | ||
train_split: train # this folder inside data/ will be used for training, it contains the images in subfolders. | ||
valid_split: null | ||
column_mapping: | ||
image_column: image | ||
target_column: labels | ||
|
||
params: | ||
epochs: 2 | ||
batch_size: 4 | ||
lr: 2e-5 | ||
optimizer: adamw_torch | ||
scheduler: linear | ||
gradient_accumulation: 1 | ||
mixed_precision: fp16 | ||
|
||
hub: | ||
username: ${HF_USERNAME} | ||
token: ${HF_TOKEN} | ||
push_to_hub: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
task: image_regression | ||
base_model: google/vit-base-patch16-224 | ||
project_name: autotrain-cats-vs-dogs-finetuned | ||
log: tensorboard | ||
backend: local | ||
|
||
data: | ||
path: cats_vs_dogs | ||
train_split: train | ||
valid_split: null | ||
column_mapping: | ||
image_column: image | ||
target_column: labels | ||
|
||
params: | ||
epochs: 2 | ||
batch_size: 4 | ||
lr: 2e-5 | ||
optimizer: adamw_torch | ||
scheduler: linear | ||
gradient_accumulation: 1 | ||
mixed_precision: fp16 | ||
|
||
hub: | ||
username: ${HF_USERNAME} | ||
token: ${HF_TOKEN} | ||
push_to_hub: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
task: image_regression | ||
base_model: google/vit-base-patch16-224 | ||
project_name: autotrain-image-regression-model | ||
log: tensorboard | ||
backend: local | ||
|
||
data: | ||
path: data/ | ||
train_split: train # this folder inside data/ will be used for training, it contains the images and metadata.jsonl | ||
valid_split: valid # this folder inside data/ will be used for validation, it contains the images and metadata.jsonl. can be set to null | ||
# column mapping should not be changed for local datasets | ||
column_mapping: | ||
image_column: image | ||
target_column: target | ||
|
||
params: | ||
epochs: 2 | ||
batch_size: 4 | ||
lr: 2e-5 | ||
optimizer: adamw_torch | ||
scheduler: linear | ||
gradient_accumulation: 1 | ||
mixed_precision: fp16 | ||
|
||
hub: | ||
username: ${HF_USERNAME} | ||
token: ${HF_TOKEN} | ||
push_to_hub: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Image Scoring/Regression Parameters | ||
|
||
The Parameters for image scoring/regression are same as the parameters for image classification. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.