当前位置:网站首页>‘Results do not correspond to current coco set‘
‘Results do not correspond to current coco set‘
2022-07-24 05:20:00 【河海CV小菜鸡】
在训练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分割,再去掉剩下来的点,代码就能成功跑通了
边栏推荐
- 如何快速打通CRM系统和ERP系统,实现业务流程自动化流转
- 多商户商城系统功能拆解08讲-平台端商品分类
- 【activiti】activiti介绍
- Canal+kafka actual combat (monitor MySQL binlog to realize data synchronization)
- Vulnhub funbox: rookie (funbox2) target penetration
- Whole station downloader recommendation
- 数据集成的两种架构:ELT和ETL
- The SaaS mall system of likeshop single merchant is built, and the code is open source without encryption.
- 【mycat】mycat配置文件
- 电商系统PC商城模块介绍
猜你喜欢

Zotero快速上手指南
![利用流媒体将RSTP流转成WEB端播放(二)[可回看]](/img/b9/2c0e6eb19acaa2356ff49f6e272826.png)
利用流媒体将RSTP流转成WEB端播放(二)[可回看]

Inventory of well-known source code mall systems at home and abroad

Logical structure of Oracle Database

程序员常说的API是什么意思?API类型有什么呢?

Flink task, sub task, task slot and parallelism

likeshop单商户SAAS商城系统无限多开

haclabs: no_ Name (hl.ova) target penetration vulnhub

Vulnhub funbox: rookie (funbox2) target penetration

Flink Format系列(1)-JSON
随机推荐
多商户商城系统功能拆解09讲-平台端商品品牌
The repetition detection function of PHP multi line text content and count the number of repetitions
【activiti】activiti环境配置
ERP+RPA 打通企业信息孤岛,企业效益加倍提升
Logical structure of Oracle Database
flink checkpoint配置详解
Oracle数据库的逻辑结构
The way to attack the first poca hackson project "Manta network"
My little idea -- using MATLAB to realize reading similar to ring buffer
Flink 生产环境配置建议
Insanity:1 (insanity hosting) target penetration vulnhub
读《悟道:一位IT高管20年的职场心经》
[vSphere high availability] host failover
Zotero Quick Start Guide
@Async does not execute asynchronously
Vulnhub funbox: rookie (funbox2) target penetration
多商户商城系统功能拆解04讲-平台端商家入驻
电商系统PC商城模块介绍
Scarcity in Web3: how to become a winner in a decentralized world
How to export Excel files with php+mysql