Skip to content

Commit

Permalink
updated model pt file names
Browse files Browse the repository at this point in the history
  • Loading branch information
KalanaRatnayake committed Jul 10, 2024
1 parent 83e1491 commit 978cbde
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 45 deletions.
42 changes: 3 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ services:
boxmot:
image: ghcr.io/kalanaratnayake/boxmot-ros:humble
environment:
- TRACKING_MODEL=weights/yolov9t.pt
- REID_MODEL=weights/yolov9t.pt
- TRACKING_MODEL=deepocsort
- REID_MODEL=osnet_x0_25_msmt17.pt
- INPUT_TOPIC=/yolo_ros/detection_result
- PUBLISH_ANNOTATED_IMAGE=True
- OUTPUT_ANNOTATED_TOPIC=/boxmot_ros/annotated_image
Expand All @@ -47,42 +47,6 @@ volumes:
boxmot:
```

### Custom models with Docker Compose

Add the following snippet under `services` to any compose.yaml file to add this container and use an existing model.

```bash
services:
boxmot:
image: ghcr.io/kalanaratnayake/boxmot-ros:humble
environment:
- TRACKING_MODEL=weights/yolov9t.pt
- REID_MODEL=weights/yolov9t.pt
- INPUT_TOPIC=/yolo_ros/detection_result
- PUBLISH_ANNOTATED_IMAGE=True
- OUTPUT_ANNOTATED_TOPIC=/boxmot_ros/annotated_image
- OUTPUT_DETAILED_TOPIC=/boxmot_ros/tracking_result
- CONFIDENCE_THRESHOLD=0.25
- DEVICE='0'
restart: unless-stopped
privileged: true
network_mode: host
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
volumes:
- type: bind
source: /home/kalana/Downloads/weights
target: /boxmot/weights

volumes:
boxmot:
```

## Docker Usage with this repository

Clone this reposiotory
Expand Down Expand Up @@ -150,7 +114,7 @@ ros2 launch boxmot_ros boxmot.launch.py
| ROS Parameter | Docker ENV parameter | Default Value | Description |
| :--- | :--- | :---: | :--- |
| tracking_model | TRACKING_MODEL | `deepocsort` | Model to be used for tracking. see [1] for default models and [2] for custom models |
| reid_model | REID_MODEL | `yolov9t.pt` | Model to be used for reidentification. see [1] for default models and [2] for custom models |
| reid_model | REID_MODEL | `osnet_x0_25_msmt17.pt` | Model to be used for reidentification. see [1] for default models and [2] for custom models |
| input_topic | INPUT_TOPIC | `/yolo_ros/detection_result` | Topic to subscribe for RGB image. Accepts `sensor_msgs/Image` |
| publish_annotated_image | PUBLISH_ANNOTATED_IMAGE | `False` | Whether to publish annotated image, increases callback execution time when set to `True` |
| output_annotated_topic | OUTPUT_ANNOTATED_TOPIC | `/boxmot_ros/annotated_image` | Topic for publishing annotated images uses `sensor_msgs/Image` |
Expand Down
4 changes: 2 additions & 2 deletions config/boxmot_ros_params.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
boxmot_ros_node:
ros__parameters:
tracking_model: "yolov9s.pt"
reid_model: "yolov9s.pt"
tracking_model: "deepocsort"
reid_model: "osnet_x0_25_msmt17.pt"
input_topic: "/yolo_ros/detection_result"
publish_annotated_image: True
output_annotated_topic: "/boxmot_ros/annotated_image"
Expand Down
4 changes: 2 additions & 2 deletions docker/compose.amd64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ services:
boxmot:
image: ghcr.io/kalanaratnayake/boxmot-ros:humble
environment:
- TRACKING_MODEL=weights/yolov9t.pt
- REID_MODEL=weights/yolov9t.pt
- TRACKING_MODEL=deepocsort
- REID_MODEL=osnet_x0_25_msmt17.pt
- INPUT_TOPIC=/yolo_ros/detection_result
- PUBLISH_ANNOTATED_IMAGE=True
- OUTPUT_ANNOTATED_TOPIC=/boxmot_ros/annotated_image
Expand Down
4 changes: 2 additions & 2 deletions docker/compose.jnano.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ services:
boxmot:
image: ghcr.io/kalanaratnayake/boxmot-ros:humble-j-nano
environment:
- TRACKING_MODEL=weights/yolov9t.pt
- REID_MODEL=weights/yolov9t.pt
- TRACKING_MODEL=deepocsort
- REID_MODEL=osnet_x0_25_msmt17.pt
- INPUT_TOPIC=/yolo_ros/detection_result
- PUBLISH_ANNOTATED_IMAGE=True
- OUTPUT_ANNOTATED_TOPIC=/boxmot_ros/annotated_image
Expand Down

0 comments on commit 978cbde

Please sign in to comment.