We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My Code:
def mask_smoothen(img, mask, nclasses): mask = mask.astype(np.float32) #mask.astype(np.uint8) image = img height, width, channels = image.shape d = dcrf.DenseCRF2D(height, width, nclasses) labels = mask.T U = unary_from_softmax(labels) U = np.ascontiguousarray(U) print(U.dtype, U.shape) d.setUnaryEnergy(U) d.addPairwiseBilateral(sxy=80, srgb=13, rgbim=image, compat=10) Q = d.inference(5) fine_mask = np.argmax(Q, axis=0).reshape(height, width) return fine_mask
I get the error "Bad shape for unary energy (Need (2, 1053979828), got (39677, 26564))"
My image and masks are large: 39677 x 26564
Can some one help me understand what is happening here.
The text was updated successfully, but these errors were encountered:
The readme says that you need to flatten it to the shape (NUM_CLASSES, H*W). Hope that helps!
(NUM_CLASSES, H*W)
Sorry, something went wrong.
resize you pic maybe
No branches or pull requests
My Code:
I get the error "Bad shape for unary energy (Need (2, 1053979828), got (39677, 26564))"
My image and masks are large: 39677 x 26564
Can some one help me understand what is happening here.
The text was updated successfully, but these errors were encountered: