Skip to content
New issue

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

how to predict the ground truth image with weighted ensemble? #16

Open
farhanmarwat opened this issue Jan 17, 2022 · 0 comments
Open

how to predict the ground truth image with weighted ensemble? #16

farhanmarwat opened this issue Jan 17, 2022 · 0 comments

Comments

@farhanmarwat
Copy link

Dear Titu Brother,
thank you for the valuable source code that you have provided. Can you please guide me how to predict the ground truth image with weighted ensemble as given the predicted accuracy. I can not figuring out how to predict the ground truth images with weighted ensemble thanks in advance. for the reference of ground truth image prediction i have given the code below. please guide me thanks.
Regards

calculate the predicted image

outputs = np.zeros((height,width))
for i in range(height):
for j in range(width):
target = int(y[i,j])
if target == 0 :
continue
else :
image_patch=Patch(X,i,j)
X_test_image = image_patch.reshape(1,image_patch.shape[0],image_patch.shape[1], image_patch.shape[2], 1).astype('float32')
prediction = (yPred.predict(X_test_image))
prediction = np.argmax(prediction, axis=1)
outputs[i][j] = prediction+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant