Apply Ruff 0.9.0 (#18622)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
cc1e77138c
commit
3902e740cf
22 changed files with 69 additions and 65 deletions
|
|
@ -299,7 +299,7 @@ class GroundingDataset(YOLODataset):
|
|||
LOGGER.info("Loading annotation file...")
|
||||
with open(self.json_file) as f:
|
||||
annotations = json.load(f)
|
||||
images = {f'{x["id"]:d}': x for x in annotations["images"]}
|
||||
images = {f"{x['id']:d}": x for x in annotations["images"]}
|
||||
img_to_anns = defaultdict(list)
|
||||
for ann in annotations["annotations"]:
|
||||
img_to_anns[ann["image_id"]].append(ann)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue