PyUpgrade 3.8 updates (#15941)
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
ea13dc6208
commit
9ec8e9acbf
13 changed files with 25 additions and 25 deletions
|
|
@ -296,7 +296,7 @@ class GroundingDataset(YOLODataset):
|
|||
"""Loads annotations from a JSON file, filters, and normalizes bounding boxes for each image."""
|
||||
labels = []
|
||||
LOGGER.info("Loading annotation file...")
|
||||
with open(self.json_file, "r") as f:
|
||||
with open(self.json_file) as f:
|
||||
annotations = json.load(f)
|
||||
images = {f'{x["id"]:d}': x for x in annotations["images"]}
|
||||
img_to_anns = defaultdict(list)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue