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

DL101 Multi-Image Classifier to Test Prediction Accuracy, and tabular arrangement of classified images. #89

Open
boyesky1 opened this issue Feb 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@boyesky1
Copy link

boyesky1 commented Feb 7, 2022

Describe the bug
when trying to test the prediction accuracy of a CV model, the given code allows multi image upload, but does not classify the uploaded images. "it will be nice and highly helpful to be able to upload and classify multiple images all at once." this will reduce the stress of accuracy testing and enhance the usability of the model.

To Reproduce
Steps to reproduce the behavior or code you have used

Expected behavior
(1) to be able to upload multiple test images at a time, "from drive and from computer"
(2) to classify all uploaded test images and arrange the classified images in rows and columns.

Screenshots
If applicable, add screenshots to help explain your problem.
21bc2fb55d4864eb559b26cf8a133e0

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome and Edge
  • Version: latest

Used Codes

from ipywidgets import FileUpload
from IPython.display import display
btn_upload = FileUpload( multiple=True)
btn_upload

for img_name, img_data in btn_upload.value.items():
  print(img_name)
  img = PILImage.create(img_data["content"])
  display(img)

btn_run = widgets.Button(description='Classify')
btn_run

def on_click_classify(change):
    img = PILImage.create(btn_upload.data[-1])
    out_pl.clear_output()
    with out_pl: display(img.to_thumb(128,128))
    pred,pred_idx,probs = learn.predict(img)
    lbl_pred.value = f'Prediction: {pred}; Probability: {probs[pred_idx]:.04f}'
btn_run.on_click(on_click_classify)

btn_upload = widgets.FileUpload()

VBox([widgets.Label('Upload stream image!'), 
      btn_upload, btn_run, out_pl, lbl_pred])

@boyesky1 boyesky1 added the bug Something isn't working label Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant