[go: nahoru, domu]

Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.54 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.54 KB

FastViT Sample

This sample demonstrates the use of FastViT converted to Core ML using coremltools. FastViT is a small and very fast model for image classification.

Instructions

  1. Download FastViTT8F16.mlpackage from the Hugging Face Hub and place it inside the models folder of the project.
  2. Open FastViTSample.xcodeproj in XCode.
  3. Build & run the project!

The FastViT model was introduced in the paper FastViT: A Fast Hybrid Vision Transformer using Structural Reparameterization by Pavan Kumar Anasosalu Vasu et al. and first released in this repository.

Download

Core ML packages are available in:

Install huggingface-cli

brew install huggingface-cli

Download FastViTT8F16.mlpackage to the models directory:

huggingface-cli download \
  --local-dir models --local-dir-use-symlinks False \
  apple/coreml-FastViT-T8 \
  --include "FastViTT8F16.mlpackage/*"

FastViT-T8 is the smallest version of the model, with 4M parameters. You can also try the larger and more accurate FastViT-MA36 (44M parameters), downloading it from apple/coreml-FastViT-MA36.