Open ysig opened 4 years ago
I have the same issue. I want to use this detector on custom immage not annotated, but I have problems running the code.
A quick and dirty method is to go inside of the test_dataset
method loop in detector.py
and load in your own image from somewhere in the folder, convert to numpy, and then pass into the model:
img = Image.open('./original.jpg')
# convert image to numpy array
data = np.asarray(img)
r = model.detect([data], verbose=0)[0]
The results contain the bounding box and mask info which you can then use yourself. Or you can pass data
into the visualizers as the first argument.
thanks @deandiakov it works
I have all sorts of problems trying to simplify the code, so I can do inference on a custom dataset with NO annotations. Is there an easy way you can do so?
Thanks