Skip to content
williamgltPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Steps to Run SAM with TensorRT

Step 0: Install Requirements

Run the following command to install dependencies:

pip install -r requirements.txt

Step 1: Download SAM ViT-H Checkpoint

Download the checkpoint from the official repository: Segment Anything Model - Checkpoints

Step 2: Place the Checkpoint File

Move the downloaded checkpoint file to the following directory:

models/pth

Step 3: Generate Encoder ONNX File

Run the script to export the encoder model:

python export_encoder_model.py --quantize=False --device="cpu"

Step 4: Configure TensorRT Paths

Modify your CMakeLists.txt file to replace the paths linking to the bin and lib directories of TensorRT.

Step 5: Build and Run the SAM Target

Compile and run the SAM target from the build/Debug directory, or modify the path in the main file accordingly.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages