Created
May 13, 2020 09:54
-
-
Save sizhky/76111db53bbe338e6671ac3648631a04 to your computer and use it in GitHub Desktop.
Load VOC data
This file contains hidden or 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
import sys; sys.path.append('/home/yyr/data/VOCdevkit/') | |
from load_data import VOCDataset, get_items, aug_trn | |
from snippets.loader import * | |
_2007_root = Path("/home/yyr/data/VOCdevkit/VOC2007") | |
_2012_root = Path("/home/yyr/data/VOCdevkit/VOC2012") | |
train_items = get_items(_2007_root, 'train') + get_items(_2012_root, 'train') | |
val_items = get_items(_2007_root, 'val') + get_items(_2012_root, 'val') | |
logger.info(f'\n{len(train_items)} training images\n{len(val_items)} validation images') | |
x = VOCDataset(train_items, tfms=aug_trn) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment