autotrain-advanced
autotrain-advanced copied to clipboard
[FEATURE REQUEST] CLI support for image-classification
Feature Request
I'm trying to use the CLI for image classification on autotrain-advanced local but I'm running into the error:
Exception: Image classification is not yet supported for local datasets using the CLI. Please use UI.
What is the roadmap for this feature to be enabled?
Motivation
We have large numbers of batches that we'd like to automate the autotrain process (running locally) and try different model architectures. Using a UI would be really cumbersome.
Additional Context
No response
it just means that local dataset support is not there. you can still upload your dataset to huggingface hub and use it for training using the cli. is that possible for you?
I have 290 different datasets to go through so doing it through the UI would be a pain!
On Wed, May 1, 2024 at 1:10 AM abhishek thakur @.***> wrote:
it just means that local dataset support is not there. you can still upload your dataset to huggingface hub and use it for training using the cli. is that possible for you?
— Reply to this email directly, view it on GitHub https://github.com/huggingface/autotrain-advanced/issues/608#issuecomment-2088132266, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPHYT3RWZDGYFG2RSXHV6LZACPRDAVCNFSM6AAAAABHBBHK7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGEZTEMRWGY . You are receiving this because you authored the thread.Message ID: @.***>
i didnt ask you to use UI. Lemme rephrase: are your image datasets on huggingface hub? if yes, you can use them directly in the CLI
Oh I got it! Let me give that a shot.
Billy
On Wed, May 1, 2024 at 7:58 AM abhishek thakur @.***> wrote:
i didnt ask you to use UI. Lemme rephrase: are your image datasets on huggingface hub? if yes, you can use them directly in the CLI
— Reply to this email directly, view it on GitHub https://github.com/huggingface/autotrain-advanced/issues/608#issuecomment-2088589175, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPHYT5JC4LG4VO7OTNWYYTZAD7I7AVCNFSM6AAAAABHBBHK7GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYGU4DSMJXGU . You are receiving this because you authored the thread.Message ID: @.***>
CLI now supports image classification. Example config:
task: image_classification
base_model: google/vit-base-patch16-224
project_name: autotrain-local-flowers-finetuned
log: tensorboard
backend: local
data:
# path contains the training and validation folders
path: Datasets/image_classification/flowers
train_split: train # this is the training folder, containing subfolders with classnames and images inside the subfolders
valid_split: null # if you have a validation folder, use its name here
column_mapping: # dont touch for local datasets
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 issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 20 days since being marked as stale.