自定义视觉同时上传多张图片
Custom vision upload multiple images in the same time
正在尝试使用自定义视觉 SDK 上传多张训练图像
for i in range(0,len(split_input)):
img_byte=connection_blob(confidential) #first I download images from my blob with a custom function, images names are in list split_input
image_list.append(ImageFileCreateEntry(name=split_input[i], contents=img_byte, tag_ids=[hemlock_tag])) #Then I create the list of images
for i in range(0,len(image_list)):
upload_result = trainer.create_images_from_files(model_id, images=[image_list[i]],raw=True) #I push data on custom vision
我的问题是有时会出错,只发送一些图像。例如,我尝试发送 20 张图片,但只发送了 10 张...
知道去哪里尝试解决问题吗?
编辑:即使我尝试一张一张地发送图片,它们也没有上传
我可能已经找到解决办法了。图片取自 powerApps,为了进行测试,我拍照的速度非常快。有些图片完全相同 = 自定义视觉只接受一个版本的图像。
您可以通过以下方式检查上传状态:
for i in range(0,len(image_list)):
upload_result = trainer.create_images_from_files(model_id, images=[image_list[i]],raw=True)
res_upload_img=upload_result.output.images
id_list.append(res_upload_img[0].image.id) #Get ID of uploaded image so u can track them on custom vision
img_status.append(res_upload_img[0].status) #return status i.e for example "Ok" or "OkDuplicated" if images was already existing
正在尝试使用自定义视觉 SDK 上传多张训练图像
for i in range(0,len(split_input)):
img_byte=connection_blob(confidential) #first I download images from my blob with a custom function, images names are in list split_input
image_list.append(ImageFileCreateEntry(name=split_input[i], contents=img_byte, tag_ids=[hemlock_tag])) #Then I create the list of images
for i in range(0,len(image_list)):
upload_result = trainer.create_images_from_files(model_id, images=[image_list[i]],raw=True) #I push data on custom vision
我的问题是有时会出错,只发送一些图像。例如,我尝试发送 20 张图片,但只发送了 10 张...
知道去哪里尝试解决问题吗?
编辑:即使我尝试一张一张地发送图片,它们也没有上传
我可能已经找到解决办法了。图片取自 powerApps,为了进行测试,我拍照的速度非常快。有些图片完全相同 = 自定义视觉只接受一个版本的图像。
您可以通过以下方式检查上传状态:
for i in range(0,len(image_list)):
upload_result = trainer.create_images_from_files(model_id, images=[image_list[i]],raw=True)
res_upload_img=upload_result.output.images
id_list.append(res_upload_img[0].image.id) #Get ID of uploaded image so u can track them on custom vision
img_status.append(res_upload_img[0].status) #return status i.e for example "Ok" or "OkDuplicated" if images was already existing