This is a ROS2 wrapper for the image classification algorithm, GhostNet
342
This is a ROS2 wrapper for the image classification algorithm, GhostNet. We utilize pytorch and torch.hub for the source of the algorithm. The main idea is for this container to act as a standalone interface and node, removing the necessity to integrate separate packages and solve numerous dependency issues.
Efficient networks by generating more features from cheap operations. Based on a set of intrinsic feature maps, GhostNet applies a series of linear transformations with cheap cost to generate many ghost feature maps that could fully reveal information underlying intrinsic features. The proposed Ghost module can be taken as a plug-and-play component to upgrade existing convolutional neural networks. Ghost bottlenecks are designed to stack Ghost modules, and then the lightweight GhostNet can be easily established.
This makes GhostNet readily useable on embedded systems such as the Jetson devices.
docker pull shaderobotics/ghostnet:${ROS2_DISTRO} we support all ROS2 distributionsgit pull -b ${ROS2_DISTRO} https://github.com/open-shade/ghostnet.gitcd ghostnetdocker build . -t [name]. This will take a while. We have also provided associated cloudbuild.sh scripts to build on GCP.Run docker run --net=host shaderobotics/ghostnet:${ROS2_DISTRO}. Your node should be running now. Then, by running ros2 topic list, you should see all the possible pub and sub routes.
For more details explaining how to run Docker images, visit the official Docker documentation here. Also, additional information as to how ROS2 communicates between external environment or multiple docker containers, visit the official ROS2 (foxy) docs here.
| Name | IO | Type | Use |
|---|---|---|---|
| ghostnet/image_raw | sub | sensor_msgs.msg.Image | Takes the raw camera output to be processed |
| ghostnet/result | pub | String | Outputs the classification label from ImageNet 100 Classes as a string |
To test and ensure that this package is properly installed, replace the Dockerfile in the root of this repo with what exists in the demo folder. Installed in the demo image contains a camera stream emulator by klintan which directly pubs images to the GhostNet node and processes it for you to observe the outputs.
To run this, run docker build . -t [name], then docker run --net=host -t [name]. Observing the logs for this will show you what is occuring within the container. If you wish to enter the running container and preform other activities, run docker ps, find the id of the running container, then run docker exec -it [containerId] /bin/bash
Content type
Image
Digest
sha256:c387f5db4…
Size
4.5 GB
Last updated
about 4 years ago
docker pull shaderobotics/ghostnet:galactic