Skip to content

smhatefi/MobileViTv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Keras 3 implementation of MobileViTv2

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages