File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1182,6 +1182,10 @@ def __upload_annotations_thread(
11821182 except SABaseException :
11831183 metadatas = []
11841184 names_in_metadatas = [metadata ["name" ] for metadata in metadatas ]
1185+ id_to_name = {
1186+ metadata ["id" ]: metadata ["name" ]
1187+ for metadata in metadatas
1188+ }
11851189 if len (names ) < len (metadatas ):
11861190 for name in names :
11871191 if name not in names_in_metadatas :
@@ -1214,8 +1218,8 @@ def __upload_annotations_thread(
12141218 )
12151219 s3_resource = s3_session .resource ('s3' )
12161220 bucket = s3_resource .Bucket (aws_creds ["bucket" ])
1217-
1218- for image_name , image_info in res [ 'images' ]. items ():
1221+ for image_id , image_info in res [ 'images' ]. items ():
1222+ image_name = id_to_name [ int ( image_id )]
12191223 json_filename = image_name + postfix_json
12201224 if from_s3_bucket is None :
12211225 full_path = Path (folder_path ) / json_filename
You can’t perform that action at this time.
0 commit comments