Tutorial - EfficientViT
Let's run MIT Han Lab's EfficientViT on Jetson!
What you need
One of the following Jetson devices:
Jetson AGX Orin (64GB) Jetson AGX Orin (32GB) Jetson Orin NX (16GB) Jetson Orin Nano (8GB)
Running one of the following versions of JetPack:
JetPack 5 (L4T r35.x)
Sufficient storage space (preferably with NVMe SSD).
- Space for checkpoints
Clone and set up
git clone https://github.com/dusty-nv/jetson-containers
sudo apt update; sudo apt install -y python3-pip
pip3 install -r requirements.txt
How to start
autotag script to automatically pull or build a compatible container image.
./run.sh $(./autotag efficientvit)
Usage of EfficientViT
The official EfficientViT repo shows the complete usage information.
Inside the container, a small benchmark script
benchmark.py is added under
/opt/efficientvit directory by the jetson-container build process.
It is to test EfficientViT-L2-SAM in bounding box mode, so we can use this as an example and verify the output.
mkdir -p /data/models/efficientvit/sam/
The downloaded checkpoint file is stored on the
/data/directory that is mounted from the Docker host.
Run benchmark script
At the end you should see a summary like the following.
AVERAGE of 2 runs:
encoder --- 0.062 sec
latency --- 0.083 sec
Memory consumption : 3419.68 MB
Check the output/result
The output image file (of the last inference result) is stored as
It is stored under
/data/ directory that is mounted from the Docker host.
So you can go back to your host machine, and check
You should find the output like this.