delivery_truck_classification

JEdward7777

Introduction

The Delivery Truck Classification model is a fine-tuned version of the microsoft/swin-tiny-patch4-window7-224 model, designed for image classification tasks. It has been trained on the imagefolder dataset and achieves a high accuracy of 97.33% on the evaluation set with a loss of 0.1787.

Architecture

This model is based on the Swin Transformer architecture, specifically the swin-tiny variant. This architecture is known for its effectiveness in handling image classification tasks by using a hierarchical feature representation.

Training

The model was trained using the following hyperparameters:

  • Learning Rate: 5e-05
  • Training Batch Size: 32
  • Evaluation Batch Size: 32
  • Seed: 42
  • Gradient Accumulation Steps: 4
  • Total Training Batch Size: 128
  • Optimizer: Adam with betas=(0.9, 0.999) and epsilon=1e-08
  • Learning Rate Scheduler: Linear with a warmup ratio of 0.1
  • Number of Epochs: 60

Guide: Running Locally

To run the Delivery Truck Classification model locally, follow these steps:

  1. Environment Setup: Ensure you have Python installed and set up a virtual environment.
  2. Install Dependencies: Install the necessary libraries using pip:
    pip install transformers==4.26.0 torch==1.13.1+cu116 datasets==2.9.0 tokenizers==0.13.2
    
  3. Download the Model: You can clone the model repository or download the model files directly from Hugging Face's model hub.
  4. Run Inference: Use the model for inference by loading it into a Python script or a Jupyter notebook.
  5. Hardware Recommendation: For efficient performance, especially with larger datasets, consider using cloud GPU services such as AWS, Google Cloud, or Azure.

License

The Delivery Truck Classification model is licensed under the Apache 2.0 License, allowing for both personal and commercial use, modification, and distribution under the terms of the license.

More Related APIs in Image Classification