yolact
yolact copied to clipboard
Maks resize error
File "E:\yolact-master\utils\augmentations.py", line 160, in call masks = cv2.resize(masks, (width, height)) cv2.error: OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:3687: error: (-215:Assertion failed) !dsize.empty() in function 'cv::hal::resize' how can i do reslove this problem
I have the same problem. Could you have solved it? Thanks
I have the same problem. Could you have solved it? Thanks
Could you have solved it?
if number of objects at the image is more than 512 open cv resize method crushes. To solve this problem modify the line
masks = cv2.resize(masks, (width, height))
at /yolact-master/utils/augmentations.py, (~ line 162):
cv_limit = 512
if masks.shape[2] <= cv_limit:
masks = cv2.resize(masks, (width, height))
else:
# split masks array on batches with max size 512 along channel axis, resize and merge them back
masks = np.concatenate([cv2.resize(masks[:, :, i:min(i + cv_limit, masks.shape[2])], (width, height))
for i in range(0, masks.shape[2], cv_limit)], axis=2)