Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.2 KB

README.md

File metadata and controls

31 lines (25 loc) · 1.2 KB

MobileViTv2

This repository contains the implementation of MobileViTv2 model in Keras 3.

Project Structure

  • mobilevit_v2.py: Contains the main model implementation.
  • configs.py: Contains the model configurations.
  • test.py: Script for evaluating the model.
  • utils/base_layers.py: Contains base layers.
  • utils/linear_attention.py: Contains Separable Self-attention implementation.
  • utils/mobilevit_v2_block.py: Contains MobileViTv2 block implementation.
  • utils/utils.py: Contains utility functions.

Usage

For evaluating the model on an example images run the test.py script:

python test.py

This will:

  • Sets the Keras 3 backend.
  • Downloads an example image from the Web.
  • Makes three different MobileViTv2 models with width multipliers α = 0.5, 1, 2 and downloads the pre-trained weights.
  • Tests these three models on the example image.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments