mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
refactor(compressors): reorganize SAM utilities into proposal module
This commit is contained in:
@@ -33,7 +33,7 @@ def import_packages():
|
||||
create_habitat_simulator,
|
||||
render_topdown_scene_map,
|
||||
)
|
||||
from utils.image import extract_masked_region, segment_image_dataset
|
||||
from compressors.proposal import extract_masked_region, generate_proposals_batch
|
||||
|
||||
return (
|
||||
HabitatSimulatorConfig,
|
||||
@@ -53,7 +53,7 @@ def import_packages():
|
||||
pl,
|
||||
plt,
|
||||
render_topdown_scene_map,
|
||||
segment_image_dataset,
|
||||
generate_proposals_batch,
|
||||
)
|
||||
|
||||
|
||||
@@ -150,7 +150,7 @@ def build_scene_graph_pipeline(
|
||||
room_nodes,
|
||||
sam_max_masks,
|
||||
sam_min_area,
|
||||
segment_image_dataset,
|
||||
generate_proposals_batch,
|
||||
sim,
|
||||
views_per_room,
|
||||
):
|
||||
@@ -191,7 +191,7 @@ def build_scene_graph_pipeline(
|
||||
rgb3 = rgb[..., :3] if rgb.shape[-1] > 3 else rgb
|
||||
room_view_images.append(Image.fromarray(rgb3.astype(np.uint8)))
|
||||
|
||||
masks_dataset = segment_image_dataset(
|
||||
masks_dataset = generate_proposals_batch(
|
||||
hash_pipeline.mask_generator,
|
||||
room_view_images,
|
||||
min_area=hash_pipeline.sam_min_mask_area,
|
||||
|
||||
Reference in New Issue
Block a user