Last active
April 25, 2020 06:42
-
-
Save mrdbourke/d4bb50db7ac571657f7692eb125f2632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create list of validation image dictionaries | |
val_img_dicts = get_image_dicts(image_folder="validation", # validation images | |
annotation_file="validation-annotations-bbox.csv", # these get formatted automatically | |
target_classes=target_classes) # list of target classes you're working with | |
>>> Using validation-annotations-bbox.csv for annotations... | |
On dataset: validation/ | |
Classes we're using: | |
Coffeemaker 21 | |
Name: ClassName, dtype: int64 | |
Total number of images: 21 | |
Saving labels to: validation/valid_labels.json... # files get saved to JSON for later | |
Showing an example: | |
[{'annotations': [{'bbox': [2.0, 173.0, 1008.0, 768.0], | |
'bbox_mode': <BoxMode.XYXY_ABS: 0>, | |
'category_id': 1}], | |
'file_name': './cmaker-fireplace-valid/c86feb2143de77e7.jpg', | |
'height': 768, | |
'image_id': 50, | |
'width': 1024}] | |
CPU times: user 1.46 s, sys: 25.1 ms, total: 1.49 s | |
Wall time: 1.49 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment