Skip to content

Commit 8b02d23

Browse files
committed
moving utils from perception to pollen_vision
1 parent fe7f347 commit 8b02d23

File tree

15 files changed

+14
-16
lines changed

15 files changed

+14
-16
lines changed

Diff for: README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<!-- # Pollen Vision -->
3333

3434
<div align="center">
35-
35+
3636
![demo](assets/pollen_vision_intro.gif)
3737

3838
</div>
@@ -46,7 +46,7 @@ import cv2
4646

4747
from pollen_vision.vision_models.object_detection import OwlVitWrapper
4848
from pollen_vision.vision_models.object_segmentation import MobileSamWrapper
49-
from pollen_vision.perception.utils import Annotator, get_bboxes
49+
from pollen_vision.utils import Annotator, get_bboxes
5050

5151

5252
owl = OwlVitWrapper()
@@ -81,7 +81,7 @@ We continue to work on adding new models that could be useful for robotics perce
8181

8282
We chose to focus on zero-shot models to make it easier to use and deploy. Zero-shot models can recognize objects or segment them based on text queries, without needing to be fine-tuned on annotated datasets.
8383

84-
Right now, we support:
84+
Right now, we support:
8585
#### Object detection
8686
- `Yolo-World` for zero-shot object detection and localization
8787
- `Owl-Vit` for zero-shot object detection and localization
@@ -93,7 +93,7 @@ Right now, we support:
9393
#### Monocular depth estimation
9494
- `Depth Anything` for (non metric) monocular depth estimation
9595

96-
Below is an example of combining `Owl-Vit` and `Mobile-Sam` to detect and segment objects in a point cloud, all live.
96+
Below is an example of combining `Owl-Vit` and `Mobile-Sam` to detect and segment objects in a point cloud, all live.
9797
(Note: in this example, there is no temporal or spatial filtering of any kind, we display the raw outputs of the models computed independently on each frame)
9898

9999
https://github.com/pollen-robotics/pollen-vision/assets/6552564/a5285627-9cba-4af5-aafb-6af3d1e6d40c
@@ -185,7 +185,7 @@ python pollen-vision/gradio/app.py
185185
<details>
186186

187187
<summary>Examples</summary>
188-
188+
189189
# Examples
190190

191191
## Vision models wrappers
@@ -199,5 +199,3 @@ Check our [example scripts](examples/camera_wrappers_examples/)!
199199

200200
[![Twitter URL](https://img.shields.io/twitter/url?url=https%3A%2F%2Ftwitter.com%2Fpollenrobotics)](https://twitter.com/pollenrobotics)
201201
[![Linkedin URL](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/company/pollen-robotics/mycompany/)
202-
203-

Diff for: examples/camera_wrappers_examples/live_pcl.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
get_config_file_path,
88
get_config_files_names,
99
)
10-
from pollen_vision.perception.utils.pcl_visualizer import PCLVisualizer
10+
from pollen_vision.utils.pcl_visualizer import PCLVisualizer
1111

1212
valid_configs = get_config_files_names()
1313

Diff for: examples/vision_models_examples/Object Detection OWL-ViT.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176
"metadata": {},
177177
"outputs": [],
178178
"source": [
179-
"from pollen_vision.perception.utils import Annotator"
179+
"from pollen_vision.utils import Annotator"
180180
]
181181
},
182182
{

Diff for: examples/vision_models_examples/Object Segmentation - Mobile SAM.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"metadata": {},
195195
"outputs": [],
196196
"source": [
197-
"from pollen_vision.perception.utils import get_bboxes\n",
197+
"from pollen_vision.utils import get_bboxes\n",
198198
"\n",
199199
"bboxes = get_bboxes(predictions)"
200200
]
@@ -218,7 +218,7 @@
218218
"metadata": {},
219219
"outputs": [],
220220
"source": [
221-
"from pollen_vision.perception.utils import Annotator"
221+
"from pollen_vision.utils import Annotator"
222222
]
223223
},
224224
{

Diff for: gradio/app.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import numpy as np
1111
import numpy.typing as npt
1212
from datasets import load_dataset
13-
from pollen_vision.perception.utils import Annotator, get_bboxes
13+
from pollen_vision.utils import Annotator, get_bboxes
1414
from pollen_vision.vision_models.object_detection import OwlVitWrapper
1515
from pollen_vision.vision_models.object_segmentation import MobileSamWrapper
1616

Diff for: pollen_vision/pollen_vision/perception/perception.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import numpy as np
77
import numpy.typing as npt
88
from pollen_vision.camera_wrappers import CameraWrapper
9-
from pollen_vision.perception.utils import (
9+
from pollen_vision.utils import (
1010
Annotator,
1111
ObjectsFilter,
1212
get_bboxes,

Diff for: pollen_vision/pollen_vision/vision_models/object_segmentation/mobile_sam/mobile_sam_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy.typing as npt
55
import torch
66
from mobile_sam import SamPredictor, sam_model_registry
7-
from pollen_vision.perception.utils import get_checkpoint_path, get_checkpoints_names
7+
from pollen_vision.utils import get_checkpoint_path, get_checkpoints_names
88

99

1010
class MobileSamWrapper:

Diff for: scripts/annotate_video.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import cv2
2424
import numpy as np
2525
import tqdm
26-
from pollen_vision.perception.utils import Annotator, get_bboxes
26+
from pollen_vision.utils import Annotator, get_bboxes
2727
from pollen_vision.vision_models.object_detection import OwlVitWrapper
2828
from pollen_vision.vision_models.object_segmentation import MobileSamWrapper
2929
from recorder import Recorder

Diff for: scripts/yolo_world_demo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import cv2
22
from pollen_vision.camera_wrappers.depthai import SDKWrapper
33
from pollen_vision.camera_wrappers.depthai.utils import get_config_file_path
4-
from pollen_vision.perception.utils import Annotator
4+
from pollen_vision.utils import Annotator
55
from pollen_vision.vision_models.object_detection import YoloWorldWrapper
66

77
w = SDKWrapper(get_config_file_path("CONFIG_SR"))

0 commit comments

Comments
 (0)