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
I have a model with non-square input size (832x512, both values are divisible by 32) for segmentation. Then the output size will be 208х128. Therefore, I should change some values in yolov8.h, as shown below:
// Segmentation config options
int segChannels = 32;
int segH = 128;
int segW = 208;
float segmentationThreshold = 0.5f;
But in this case, the error appears:
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.8.0) /tmp/opencv-4.8.0/modules/core/src/matrix.cpp:808: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'Mat'
When I use square input (for example, 512x512 for input, then segW x segH = 128x128 for output), then there is no error and segmentation works correctly. I noticed that the error occurs in the line dest = dest(roi); in yolov8.cpp file, because in this case dest.size(): [128 x 208] and roi.size(): [208 x 80]. Is there a way to run your segmentation component for such "non-square" width/height tensor sizes?
The text was updated successfully, but these errors were encountered:
I have a model with non-square input size (832x512, both values are divisible by 32) for segmentation. Then the output size will be 208х128. Therefore, I should change some values in yolov8.h, as shown below:
But in this case, the error appears:
When I use square input (for example, 512x512 for input, then segW x segH = 128x128 for output), then there is no error and segmentation works correctly. I noticed that the error occurs in the line
dest = dest(roi);
in yolov8.cpp file, because in this casedest.size(): [128 x 208]
androi.size(): [208 x 80]
. Is there a way to run your segmentation component for such "non-square" width/height tensor sizes?The text was updated successfully, but these errors were encountered: