What problem does it solve?
This Skill addresses the complexity and time-consuming nature of training and fine-tuning vision models. It provides a streamlined, cloud-based experience using Hugging Face Transformers and Hugging Face Jobs.
Core Features & Use Cases
- Cloud-Based Training: Leverage managed cloud GPUs for scalable and efficient training.
- Hugging Face Transformers Integration: Utilize state-of-the-art vision models from Hugging Face Transformers library.
- Dataset Preparation: Automate the preparation of COCO-format datasets with Albumentations augmentation.
- Evaluation: Perform mAP/mAR evaluation and track accuracy metrics.
- Use Case: A user can train a segmentation model for image matting by simply providing a dataset with image and mask columns, and specifying the appropriate prompts.
Quick Start
To train a SAM2 segmentation model on the 'MicroMat-mini' dataset, use the following command: uv run huggingface-vision-trainer.py --model_name_or_path "facebook/sam2.1-hiera-small" --dataset_name "merve/MicroMat-mini" --prompt_type "bbox" --prompt_column_name "prompt" --output_dir "sam2-finetuned" --num_train_epochs 30 --per_device_train_batch_size 4 --learning_rate 1e-5 --logging_steps 1 --save_strategy "epoch" --save_total_limit 2 --remove_unused_columns False --dataloader_pin_memory False --push_to_hub True --hub_model_id "username/sam2-finetuned" --do_train True --report_to "trackio" --report_to "tensorboard" --tensorboard_log_dir "tensorboard_logs".