fix: segm/bbox combined inference doesn't work well
This commit is contained in:
+2
-2
@@ -126,7 +126,7 @@ class UltraBBoxDetector:
|
||||
return shape, items
|
||||
|
||||
def detect_combined(self, image, threshold, dilation):
|
||||
detected_results = inference_bbox(self.bbox_model, image, threshold)
|
||||
detected_results = inference_bbox(self.bbox_model, core.tensor2pil(image), threshold)
|
||||
segmasks = core.create_segmasks(detected_results)
|
||||
if dilation > 0:
|
||||
segmasks = core.dilate_masks(segmasks, dilation)
|
||||
@@ -176,7 +176,7 @@ class UltraSegmDetector:
|
||||
return shape, items
|
||||
|
||||
def detect_combined(self, image, threshold, dilation):
|
||||
detected_results = inference_bbox(self.bbox_model, image, threshold)
|
||||
detected_results = inference_segm(self.bbox_model, core.tensor2pil(image), threshold)
|
||||
segmasks = core.create_segmasks(detected_results)
|
||||
if dilation > 0:
|
||||
segmasks = core.dilate_masks(segmasks, dilation)
|
||||
|
||||
@@ -3,7 +3,7 @@ import folder_paths
|
||||
import impact.core as core
|
||||
import impact.subcore as subcore
|
||||
|
||||
print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.2.2)")
|
||||
print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.2.3)")
|
||||
|
||||
model_path = folder_paths.models_dir
|
||||
folder_paths.folder_names_and_paths["ultralytics_bbox"] = ([os.path.join(model_path, "ultralytics", "bbox")], folder_paths.supported_pt_extensions)
|
||||
|
||||
Reference in New Issue
Block a user