microsoft / studentambassadors

This repository is for Microsoft Learn Student Ambassadors.
MIT License
127 stars 47 forks source link

"No Valid Image Files" Error While Uploading Images to CustomVision From Python SDK #171

Open Curiouspaul1 opened 1 year ago

Curiouspaul1 commented 1 year ago

Describe the bug

After following the steps in the cv-classify-bird-species module, i tried to upload training data (image files) to a customvision project but it fails repeatedly (each time i re-tried) and gives the error:

Traceback (most recent call last):
  File "app.py", line 59, in <module>
    uploadImageList(batch)
  File "app.py", line 42, in uploadImageList
    upload_result = trainer.create_images_from_files(project_id="38b1f962-a7dc-4c64-9ccb-d378e873c7d3", batch=image_list)
  File "C:\Users\Paulo\documents\projects\customv\env\lib\site-packages\azure\cognitiveservices\vision\customvision\training\operations\_custom_vision_training_client_operations.py", line 970, in create_images_from_files
    raise models.CustomVisionErrorException(self._deserialize, response)
azure.cognitiveservices.vision.customvision.training.models._models_py3.CustomVisionErrorException: No valid image files

I did some research and found that this issue might be related to an open issue on the repo for the python SDK #here. Which i believe might be same cause for this issue.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://learn.microsoft.com/en-us/training/modules/cv-classify-bird-species
  2. Follow the Steps and make sure to install python dependencies.
  3. Try running the script to upload the files in the upload the data section.

Expected behavior

All files are uploaded to custom vision and a success message is returned.

Screenshots

If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

Issue might be related to #this


🎓 Add a tag to this issue for your current education role: student, Student Ambassador or educator.

Beta Student Ambassador


github-actions[bot] commented 1 year ago

Thank you for submitting this issue! The team will review your issue, tag with the appropriate tags, and comment with any additional questions on information needed. :sparkles:

BethanyJep commented 1 year ago

Thank you for this, I'll recreate the process and see how a fix can be applied