train.py里make_dataloader读取数据集。
train_loader = make_dataloader(cfg, is_train=True, distributed=args.distributed)
dataset build.py中的39行
dataset = eval(cfg.DATASET.DATASET)(
cfg,
cfg.DATASET.TRAIN,
heatmap_generator,
offset_generator,
transforms
)
cfg.DATASET.DATASET是coco_kpt
而导入包from .COCOKeypoints import CocoKeypoints as coco_kpt。
COCOkeypoints是继承的COCOdataset
cfg.DATASET.TRAIN是str类型内容是train2017
标签:读取,generator,cfg,make,hrnet,DATASET,train,coco From: https://www.cnblogs.com/hahaah/p/17084482.html