ayoolaolafenwa / PixelLib

Visit PixelLib's official documentation https://pixellib.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to detect objects

patricxu opened this issue · comments

I use the following code to do segmentation but all it output is a "bottle"

import pixellib
from pixellib.torchbackend.instance import instanceSegmentation

ins = instanceSegmentation()
ins.load_model("pointrend_resnet50.pkl")
target_classes = ins.select_target_classes(person = True)
ins.segmentImage("image.jpg", show_bboxes=True, segment_target_classes = target_classes, output_image_name="output_image.jpg")

I got the model from PointRend

The outcome I got is
image

even no objects got segmented on some input images.

The following message is the output from my terminal

image

@patricxu Are you sure that this is the output image it produced? I tested the same image and I got the desired result. What pytorch version are you using?

a

thanks! I upgraded torch to 1.9 then fix the issue