YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
install latest torch (currently 12.6)
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
install ultralytics for the cuda-toolkits, to enable using cuda
pip install ultralytics
usage
training a resnet-18 model on classification task given a folder ./dataset and file ./class.yaml the workflows sequentially balance datastet -> augment dataset -> split into train/val/test -> train resnet on train dataset -> inference on 1 image
prepare
folder ./dataset has structure like
dataset/
βββ class_1/
β βββ image_1.jpg
β βββ imgae_2.jpg
βββ class_2/
β βββ image_1.jpg
β βββ imgae_2.jpg
βββ class_3/
...
in ./class.yaml, replace classes with your own classes name
running
- create a more balance dataset , with each class have number of samples equals to the total_samples/number_of_classes, sample from each class are collected randomly
python 0_balance.py
- augment dataset
python 1_augment.py
- split dataset
python 2_split_dataset.py
- train resnet18 model
python 3_train.py
- inference on 1 image
python 4_infer.py --image_path <path_image>
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support