上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 74 下一页
摘要: 因为image对应一个mask,keypoint的mask和paf的mask都用的mask。 for idx in range(keypoint_mask.shape[0]): keypoint_mask[idx] = mask sample['keypoint_mask'] = keypoint_ 阅读全文
posted @ 2023-02-05 10:45 祥瑞哈哈哈 阅读(18) 评论(0) 推荐(0)
摘要: 用get_joint直接读取json的关键点获得17维度,第18维joints[i, -1, :2] = joints_sum / num_vis_joints。 然后T.RandomHorizontalFlip交换关键点。 'COCO_WITH_CENTER': [ 0, 2, 1, 4, 3, 阅读全文
posted @ 2023-02-04 13:54 祥瑞哈哈哈 阅读(30) 评论(0) 推荐(0)
摘要: ConvertKeypoints()交换关键点顺序,剩下其他代码并未交换顺序 def _convert(self, keypoints, w, h): # Nose, Neck, R hand, L hand, R leg, L leg, Eyes, Ears reorder_map = [1, 7 阅读全文
posted @ 2023-02-04 13:30 祥瑞哈哈哈 阅读(34) 评论(0) 推荐(0)
摘要: self.getjoint得到json存储的关键点和坐标了都是原始的。接下来是transformerT.RandomHorizontalFlip第71行设计关键点调换。对json原位置调换。 其他部分并未做其他处理。 阅读全文
posted @ 2023-02-03 18:39 祥瑞哈哈哈 阅读(27) 评论(0) 推荐(0)
摘要: json.load()函数读取文件句柄,可以直接读取到这个文件中的所有内容,并且读取的结果返回为python的dict对象。 阅读全文
posted @ 2023-02-02 19:11 祥瑞哈哈哈 阅读(179) 评论(0) 推荐(0)
摘要: def a(w): print(w) print('eval') eval('a')('123') 输出是 123 eval 阅读全文
posted @ 2023-02-02 10:36 祥瑞哈哈哈 阅读(35) 评论(0) 推荐(0)
摘要: train.py里make_dataloader读取数据集。 train_loader = make_dataloader(cfg, is_train=True, distributed=args.distributed) dataset build.py中的39行 dataset = eval(c 阅读全文
posted @ 2023-02-01 23:16 祥瑞哈哈哈 阅读(101) 评论(0) 推荐(0)
摘要: DEKR/lib/config/__init__.py中有from .default import _C as cfg。 DEKR/lib/config/default.py中的。_C更像参数 from yacs.config import CfgNode as CN _C = CN() _C.OU 阅读全文
posted @ 2023-02-01 18:40 祥瑞哈哈哈 阅读(20) 评论(0) 推荐(0)
摘要: class CocoTrainDataset(Dataset): def __init__(self, labels, images_folder, stride, sigma, paf_thickness, transform=None): super().__init__() self._ima 阅读全文
posted @ 2023-02-01 11:08 祥瑞哈哈哈 阅读(17) 评论(0) 推荐(0)
摘要: train.py的221行是做train_loader。在make_dataloader中关键代码是dataset = build_dataset(cfg, is_train)然后直接data_loader = torch.utils.data.DataLoader。 而build_dataset又 阅读全文
posted @ 2023-01-13 22:29 祥瑞哈哈哈 阅读(96) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 74 下一页