-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from Skylark0924/jjl-dev
Support open-vocabulary part-level segmentation by using VLPart and SAM
- Loading branch information
Showing
23 changed files
with
1,526 additions
and
41 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
""" | ||
Part-level segmentation using SAM and VLPart with prompt | ||
============================================================ | ||
This example allows user to provide a text prompt and generate a mask for the corresponding object part. | ||
""" | ||
|
||
import os | ||
|
||
import cv2 | ||
|
||
import rofunc as rf | ||
|
||
# obtain rgb and depth image of the grasping scene | ||
image_path = os.path.join(rf.oslab.get_rofunc_path(), "../examples/data/visualab/p2.png") | ||
image = cv2.imread(image_path) | ||
image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB) | ||
|
||
text_prompt = "bottle " | ||
affordance_masks = rf.visualab.vlpart_sam_predict(image, text_prompt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
https://github.com/Skylark0924/Rofunc/releases/download/v0.0.2.3/pbdlib-0.1-py3-none-any.whl | ||
https://github.com/Skylark0924/Rofunc/releases/download/v0.0.0.9/isaacgym-1.0rc4-py3-none-any.whl | ||
git+https://github.com/facebookresearch/segment-anything.git | ||
git+https://github.com/facebookresearch/segment-anything.git | ||
git+https://github.com/facebookresearch/detectron2.git | ||
git+https://github.com/openai/CLIP.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,21 @@ | ||
from __future__ import absolute_import | ||
|
||
# Visualize package | ||
from .trajectory import * | ||
from .ellipsoid import * | ||
from .distribution import * | ||
from .utils import * | ||
from .sam_seg import * | ||
from .image import * | ||
from .interact import * | ||
|
||
# Segment package | ||
from .segment import * | ||
from .segment.sam_seg import * | ||
from .segment.vlpart_sam_seg import * | ||
|
||
# Detect package | ||
|
||
# Point cloud package | ||
|
||
# SLAM package | ||
|
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.