kadirnar / segment-anything-video

MetaSeg: Packaged version of the Segment Anything repository
Apache License 2.0
946 stars 67 forks source link

sahi_predict is used to predict what the SahiAutoSegmentation is. input_box in predict is [] #67

Open threeneedone opened 1 year ago

threeneedone commented 1 year ago

sahi_predict is used to predict what the SahiAutoSegmentation is. input_box in predict is []?

kadirnar commented 1 year ago

SAHI library only outputs boxes. You can segment these outputs using the SAM library. Can you write the question more descriptively?

th0mas-codes commented 11 months ago

I found that commenting out the second "result" variable right after the get_sliced_predicition properly passed the output boxes to SahiAutoSegmentation().image_predict where as before it was always an empty array.

its found in sahi_predictor.py

result = get_sliced_prediction(
    image_path,
    detection_model,
    slice_height=slice_height,
    slice_width=slice_width,
    overlap_height_ratio=overlap_height_ratio,
    overlap_width_ratio=overlap_width_ratio,
)

# result = get_prediction(image_path, detection_model) <-- comment out this line