首页 > 其他分享 >hrnet

hrnet

时间:2023-01-13 22:45:08浏览次数:35  
标签:generator cfg hrnet dataset train transforms DATASET

train.py的221行是做train_loader。

train_loader = make_dataloader(
cfg, is_train=True, distributed=args.distributed
)

他这里有几句下面是被make_dataloader所包含的一个函数在dataset.buld.py里

def build_dataset(cfg, is_train):
assert is_train is True, 'Please only use build_dataset for training.'

transforms = build_transforms(cfg, is_train)

heatmap_generator = HeatmapGenerator(
cfg.DATASET.OUTPUT_SIZE, cfg.DATASET.NUM_JOINTS
)
offset_generator = OffsetGenerator(
cfg.DATASET.OUTPUT_SIZE, cfg.DATASET.OUTPUT_SIZE,
cfg.DATASET.NUM_JOINTS, cfg.DATASET.OFFSET_RADIUS
)

dataset = eval(cfg.DATASET.DATASET)(
cfg,
cfg.DATASET.TRAIN,
heatmap_generator,
offset_generator,
transforms
)

return dataset

先转换再读取数据

标签:generator,cfg,hrnet,dataset,train,transforms,DATASET
From: https://www.cnblogs.com/hahaah/p/17050889.html

相关文章

  • hrnet的get_joint
    他的第18个keypoint存的是平均坐标。defget_joints(self,anno):num_people=len(anno)area=np.zeros((num_people,1))joints=np.zeros(......