Skip to content

Commit dc73e72

Browse files
[segment_anything] new pkg (#191)
1 parent 0679e93 commit dc73e72

File tree

8 files changed

+111
-1
lines changed

8 files changed

+111
-1
lines changed

.gitmodules

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
[submodule "image_recognition_footwear/docs"]
1111
path = image_recognition_footwear/docs
1212
url = https://github.com/tue-robotics/tue_documentation_python.git
13-
branch = master
1413
[submodule "image_recognition_openface/docs"]
1514
path = image_recognition_openface/docs
1615
url = https://github.com/tue-robotics/tue_documentation_python.git
@@ -20,6 +19,9 @@
2019
[submodule "image_recognition_rqt/docs"]
2120
path = image_recognition_rqt/docs
2221
url = https://github.com/tue-robotics/tue_documentation_python.git
22+
[submodule "image_recognition_segment_anything/docs"]
23+
path = image_recognition_segment_anything/docs
24+
url = https://github.com/tue-robotics/tue_documentation_python.git
2325
[submodule "image_recognition_skybiometry/docs"]
2426
path = image_recognition_skybiometry/docs
2527
url = https://github.com/tue-robotics/tue_documentation_python.git
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
cmake_minimum_required(VERSION 3.0.2)
2+
project(image_recognition_segment_anything)
3+
4+
find_package(catkin REQUIRED)
5+
6+
catkin_python_setup()
7+
8+
catkin_package()
9+
10+
#install(PROGRAMS
11+
#scripts/footwear_node
12+
#scripts/get_footwear
13+
#DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
14+
#)
15+
16+
if(CATKIN_ENABLE_TESTING)
17+
find_package(catkin_lint_cmake REQUIRED)
18+
catkin_add_catkin_lint_test()
19+
endif()
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# image_recognition_segment_anything
2+
3+
ROS Wrapper around the segment anything model
4+
5+
## Installation
6+
7+
See <https://github.com/tue-robotics/image_recognition> for installation instructions.
8+
9+
## ROS Node (footwear_node)
10+
11+
```bash
12+
rosrun image_recognition_segment_anything footwear_node
13+
```
14+
15+
Run the image_recognition_rqt test gui (<https://github.com/tue-robotics/image_recognition_rqt>)
16+
17+
```bash
18+
rosrun image_recognition_rqt test_gui
19+
```
20+
21+
Configure the service you want to call with the gear-wheel in the top-right corner of the screen. If everything is set-up, draw a rectangle in the image around the region you would like to extract the color from.
22+
23+
## Scripts
24+
25+
### Get footwear (get_footwear)
26+
27+
Get whether there are shoes or socks in the image:
28+
29+
```bash
30+
rosrun image_recognition_segment_anything get_footwear `rospack find image_recognition_footwear`/doc/shoes.png
31+
rosrun image_recognition_segment_anything get_footwear `rospack find image_recognition_footwear`/doc/socks.png
32+
```
33+
34+
![Shoes](doc/shoes.png)
35+
![Socks](doc/socks.png)
36+
37+
Output:
38+
39+
```yaml
40+
Colors: ['light blue'] # ToDo adapt
41+
```
Submodule docs added at baf1993
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?xml version="1.0"?>
2+
<?xml-model
3+
href="http://download.ros.org/schema/package_format3.xsd"
4+
schematypens="http://www.w3.org/2001/XMLSchema"?>
5+
<package format="3">
6+
<name>image_recognition_segment_anything</name>
7+
<version>0.0.5</version>
8+
<description>The image_recognition_segment_anything package</description>
9+
10+
<author email="todo@todo.nl">Max van Vroonhoven</author>
11+
<maintainer email="todo@todo.nl">Max van Vroonhoven</maintainer>
12+
13+
<license>MIT</license>
14+
15+
<buildtool_depend>catkin</buildtool_depend>
16+
17+
<buildtool_depend>python3-setuptools</buildtool_depend>
18+
19+
<exec_depend>cv_bridge</exec_depend>
20+
<exec_depend>image_recognition_msgs</exec_depend>
21+
<exec_depend>python3-numpy</exec_depend>
22+
<exec_depend>python3-opencv</exec_depend>
23+
<exec_depend>rospy</exec_depend>
24+
25+
<test_depend>catkin_lint_cmake</test_depend>
26+
27+
<doc_depend>python3-sphinx</doc_depend>
28+
<doc_depend>python-sphinx-autoapi-pip</doc_depend>
29+
<doc_depend>python-sphinx-rtd-theme-pip</doc_depend>
30+
<doc_depend>python3-yaml</doc_depend>
31+
32+
<export>
33+
<rosdoc config="rosdoc.yaml" />
34+
</export>
35+
</package>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- builder: sphinx
2+
sphinx_root_dir: docs
3+
name: Python API
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from setuptools import setup
2+
from catkin_pkg.python_setup import generate_distutils_setup
3+
4+
d = generate_distutils_setup(
5+
packages=['image_recognition_segment_anything'],
6+
package_dir={'': 'src'}
7+
)
8+
9+
setup(**d)

image_recognition_segment_anything/src/image_recognition_segment_anything/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)