@@ -124,7 +124,7 @@ class DataAggregator:
124124 "polygon" : lambda annotation : annotation ["points" ],
125125 "polyline" : lambda annotation : annotation ["points" ],
126126 "cuboid" : lambda annotation : annotation ["points" ],
127- "comment" : lambda annotation : annotation ["points " ],
127+ "comment" : lambda annotation : annotation ["correspondence " ],
128128 "point" : lambda annotation : {"x" : annotation ["x" ], "y" : annotation ["y" ]},
129129 "ellipse" : lambda annotation : dict (
130130 cx = annotation ["cx" ],
@@ -169,7 +169,7 @@ def get_annotation_paths(self):
169169 annotations_paths = []
170170 if self .folder_names is None :
171171 self ._set_annotation_suffix (self .project_root )
172- for path in self .project_root .glob ("*.json " ):
172+ for path in self .project_root .glob ("*" ):
173173 if path .is_file () and self ._annotation_suffix in path .name :
174174 annotations_paths .append (path )
175175 elif path .is_dir () and path .name != "classes" :
@@ -389,14 +389,12 @@ def aggregate_image_annotations_as_df(self, annotations_paths: List[str]):
389389 with open (annotation_path , 'r' ) as fp :
390390 annotation_json = json .load (fp )
391391 parts = Path (annotation_path ).name .split (self ._annotation_suffix )
392- if len (parts ) != 2 :
393- continue
394392 row_data = self .__fill_image_metadata (row_data , annotation_json ['metadata' ])
395393 annotation_instance_id = 0
396394
397395 # include comments
398396 for annotation in annotation_json ["comments" ]:
399- comment_row = copy .copy (row )
397+ comment_row = copy .copy (row_data )
400398 comment_row .comment_resolved = annotation ["resolved" ]
401399 comment_row .comment = DataAggregator .MAPPERS ["comment" ](annotation )
402400 comment_row = self .__fill_user_metadata (row_data , annotation )
@@ -457,7 +455,6 @@ def aggregate_image_annotations_as_df(self, annotations_paths: List[str]):
457455 "Annotation class group %s not in classes json. Skipping." ,
458456 attribute_group ,
459457 )
460- print ("asdasdasd" )
461458 continue
462459 if (
463460 attribute_name
0 commit comments