‘Results do not correspond to current coco set‘

在训练YOLOV6的时候碰上了

'Results do not correspond to current coco set'

这个问题。

assert set(annsImgIds) == (set(annsImgIds) & set(self.getImgIds())) 根据这个断言检查了下。

调用coco API检查了下,打印出来len((person_imgs_id)的值为297.

from pycocotools.coco import COCO
val_info = r'VOC/annotations/instances_val.json'

coco = COCO(val_info)  # 导入验证集
person_imgs_id = coco.getImgIds()
print(len(person_imgs_id))

而在检查set(annsImgIds)时,在evaler.py文件的eval_model这个方法中

annsImgIds = [ann['image_id'] for ann in pred_results]
print(len(set(annsImgIds)))

打印出来的长度为497(也就是我验证集的数量)

然后检查了下instances_val.json文件,发现

 image_id是6,而我的数据图片id为6.8CAXX.jpg,那么就找到了问题的所在。

在dataset.py中的generate_coco_format_labels方法中

img_id = osp.basename(img_path).split('.')[0]

这样就导致以一个点分割了这个图片id,6.8CAXX.jpg被分割乘了6、8CAXX、jpg 三个字符串,所以导致了json文件中出现了image_id为6的情况。

解决办法:

在dataset.py中的generate_coco_format_labels方法中

img_id = osp.basename(img_path).split('j')[0].strip('.')

将img_id改成上述代码,以j分割,再去掉剩下来的点,代码就能成功跑通了

  • 11
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 8
    评论
For generations, humans have fantasized about the ability to create devices that can see into a person?s mind and thoughts, or to communicate and interact with machines through thought alone. Such ideas have long captured the imagination of humankind in the form of ancient myths and modern science fiction stories. Recent advances in cognitive neuroscience and brain imaging technologies have started to turn these myths into a reality, and are providing us with the ability to interface directly with the human brain. This ability is made possible through the use of sensors that monitor physical processes within the brain which correspond with certain forms of thought. Brain-Computer Interfaces: Applying our Minds to Human-Computer Interaction broadly surveys research in the Brain-Computer Interface domain. More specifically, each chapter articulates some of the challenges and opportunities for using brain sensing in Human-Computer Interaction work, as well as applying Human-Computer Interaction solutions to brain sensing work. For researchers with little or no expertise in neuroscience or brain sensing, the book provides background information to equip them to not only appreciate the state-of-the-art, but also ideally to engage in novel research. For expert Brain-Computer Interface researchers, the book introduces ideas that can help in the quest to interpret intentional brain control and develop the ultimate input device. It challenges researchers to further explore passive brain sensing to evaluate interfaces and feed into adaptive computing systems. Most importantly, the book will connect multiple communities allowing research to leverage their work and expertise and blaze into the future.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值