Skip to content

Commit 4f05dbe

Browse files
committed
minor updates
1 parent c736de5 commit 4f05dbe

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# SAM3 Tensor RT
1+
# SAM3 TensorRT
22

33
This repo is a partial TensorRT implementation of [SAM 3](https://huggingface.co/facebook/sam3), designed with multi-class inference in mind. This implementation reuses the image encoding when there are multiple text inputs.
44

@@ -11,13 +11,13 @@ By default I export the text encoder with 32 tokens.
1111

1212
Since SAM 3 is a gated model you will need to trace the model yourself once you get access to it on huggingface. Once you are granted access download the `sam3.pt` file and put it in the `models` directory.
1313

14-
Trace the model suing the `.trt` docker image. You will need an up to date nvidia driver on your device.
14+
Trace the model using the `.trt` docker image. You will need an up to date nvidia driver on your device.
1515
```[bash]
1616
cd docker
1717
./build-trt.bash
1818
./run-trt.bash
1919
```
20-
This will bring you inside the docker image, then run: `export_all.py`
20+
This will bring you inside the docker image, then run: `python3 export_all.py`
2121

2222
### Building CPP
2323

@@ -89,7 +89,7 @@ Topics:
8989
| `/segmentation` | `sensor_msgs/Image` | published |
9090
| `/segmentation/compressed` | `sensor_msgs/CompressedImage` | published when `publish_compressed` is `true` |
9191

92-
Remap either `/image` or `/image/compressed` to your camera topic, not both. image_transport publishes the raw and compressed topics together, so remapping both runs inference on every frame twice.
92+
Remap either `/image` or `/image/compressed` to your camera topic, not both.
9393

9494
Parameters:
9595

‎docker/Dockerfile.ros‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ RUN sudo apt update \
3030
ENV RMW_IMPLEMENTATION=rmw_zenoh_cpp
3131
ENV ROS_AUTOMATIC_DISCOVERY_RANGE=LOCALHOST
3232

33+
RUN mkdir -p ws/src
3334
RUN echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc

‎docker/run-ros.bash‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ docker run -it --rm \
88
-v "/tmp/.X11-unix:/tmp/.X11-unix" \
99
-v "`pwd`/../models:/home/`whoami`/models" \
1010
-v "`pwd`/../scripts:/home/`whoami`/scripts" \
11-
-v "`pwd`/../sam3trt:/home/`whoami`/sam3trt" \
11+
-v "`pwd`/../sam3trt:/home/`whoami`/ws/src/sam3trt" \
1212
-v "`pwd`/../sam3trtpy:/home/`whoami`/sam3trtpy" \
1313
-e DISPLAY=$DISPLAY \
1414
-e QT_X11_NO_MITSHM=1 \

0 commit comments

Comments
 (0)