You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@JoeLan96 the image you specify in the function does not exist. The error is an opencv error for an empty directory. Confirm the directory of your image.
Now, I am going to train a sample model that does not need good results to segment the QR code in the picture. I want to know how many pictures need to be labeled as a training set.
Hi,
when I try to inference with a custom model using this code, error occur.
my code as follow:
`
import pixellib
from pixellib.instance import custom_segmentation
segment_image = custom_segmentation()
segment_image.inferConfig(num_classes=2, class_names=["BG", "butterfly", "squirrel"])
segment_image.load_model("./model/Nature_model_resnet101.h5")
segment_image.segmentImage("sample1.jpg", show_bboxes=True, output_image_name="sample_out.jpg")
`
error info:
Traceback (most recent call last):
File "D:/DownProjects/Pixellib/mytrain.py", line 38, in
test1()
File "D:/DownProjects/Pixellib/mytrain.py", line 35, in test1
segment_image.segmentImage("sample1.jpg", show_bboxes=True, output_image_name="sample_out.jpg")
File "D:\ProgramFiles\anaconda\envs\pixellib\lib\site-packages\pixellib\instance.py", line 565, in segmentImage
new_img = cv2.cvtColor(image, cv2.COLOR_RGB2BGR)
cv2.error: OpenCV(4.5.2) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-t9hleyt8\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'
Thank you!
The text was updated successfully, but these errors were encountered: