Hrnet训练过程中发现一个小问题

Author: SurfeeyCreated May 26, 2025Updated May 26, 2025

加载数据集的文件my_dataset_coco.py里,CocoKeypoint的 def getitem(self, idx): target = copy.deepcopy(self.valid_person_list[idx])

    image = cv2.imread(target["image_path"])
    image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
    if self.transforms is not None:
        image, person_info = self.transforms(image, target)

    return image, target

上述代码return的应该是person_info而不是target吧,我训练用的是代码库里的train.py,调用时一般大家都会输入transforms吧。

Source: WZMIAOMIAO/deep-learning-for-image-processing