当前位置: 首页 > news >正文

图像类别生成数字标签

类别

COCO 2017数据集分类标签。coco2017数据集下载。

cls = ['background', 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus','train', 'truck', 'boat', 'traffic light', 'fire hydrant','stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog','horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra','giraffe', 'backpack', 'umbrella', 'handbag', 'tie','suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball','kite', 'baseball bat', 'baseball glove', 'skateboard','surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup','fork', 'knife', 'spoon', 'bowl', 'banana', 'apple','sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza','donut', 'cake', 'chair', 'couch', 'potted plant', 'bed','dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote','keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink','refrigerator', 'book', 'clock', 'vase', 'scissors','teddy bear', 'hair drier', 'toothbrush']

生成对应顺序数字标签方法

# key-val数字标签
cls_dict = {}
for i, cls in enumerate(train_cls):cls_dict [cls] = i

输出结果:

{'background': 0, 'person': 1, 'bicycle': 2, 'car': 3, 'motorcycle': 4, 'airplane': 5, 'bus': 6, 'train': 7, 'truck': 8, 'boat': 9, 'traffic light': 10, 'fire hydrant': 11, 'stop sign': 12, 'parking meter': 13, 'bench': 14, 'bird': 15, 'cat': 16, 'dog': 17, 'horse': 18, 'sheep': 19, 'cow': 20, 'elephant': 21, 'bear': 22, 'zebra': 23, 'giraffe': 24, 'backpack': 25, 'umbrella': 26, 'handbag': 27, 'tie': 28, 'suitcase': 29, 'frisbee': 30, 'skis': 31, 'snowboard': 32, 'sports ball': 33, 'kite': 34, 'baseball bat': 35, 'baseball glove': 36, 'skateboard': 37, 'surfboard': 38, 'tennis racket': 39, 'bottle': 40, 'wine glass': 41, 'cup': 42, 'fork': 43, 'knife': 44, 'spoon': 45, 'bowl': 46, 'banana': 47, 'apple': 48, 'sandwich': 49, 'orange': 50, 'broccoli': 51, 'carrot': 52, 'hot dog': 53, 'pizza': 54, 'donut': 55, 'cake': 56, 'chair': 57, 'couch': 58, 'potted plant': 59, 'bed': 60, 'dining table': 61, 'toilet': 62, 'tv': 63, 'laptop': 64, 'mouse': 65, 'remote': 66, 'keyboard': 67, 'cell phone': 68, 'microwave': 69, 'oven': 70, 'toaster': 71, 'sink': 72, 'refrigerator': 73, 'book': 74, 'clock': 75, 'vase': 76, 'scissors': 77, 'teddy bear': 78, 'hair drier': 79, 'toothbrush': 80}

coco2017数据集下载

from download import downloaddataset_url = "https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/datasets/ssd_datasets.zip"
path = "./"
path = download(dataset_url, path, kind="zip", replace=True)

输出:

Downloading data from https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/notebook/datasets/ssd_datasets.zip (16.0 MB)file_sizes: 100%|███████████████████████████| 16.8M/16.8M [00:00<00:00, 116MB/s]
Extracting zip file...
Successfully downloaded / unzipped to ./
http://www.lryc.cn/news/395940.html

相关文章:

  • 【Python】已解决:SyntaxError: invalid character in identifier
  • RDNet实战:使用RDNet实现图像分类任务(一)
  • Java小白入门到实战应用教程-介绍篇
  • python脚本“文档”撰写——“诱骗”ai撰写“火火的动态”python“自动”脚本文档
  • 若依 / ruoyi-ui:执行yarn dev 报错 esnext.set.difference.v2.js in ./src/utils/index.js
  • 移动端Vant-list的二次封装,查询参数重置
  • SMU Summer 2024 Contest Round 2
  • Qt:11.输入类控件(QLineEdit-单行文本输入控件、QTextEdit-多行文本输入控件、QComboBox-下拉列表的控件)
  • Qt 音频编程实战项目
  • C#委托事件的实现
  • Java策略模式在动态数据验证中的应用
  • 【Linux】shell基础知识点(updating)
  • Python基础练习•二
  • 智慧科技照亮水利未来:深入剖析智慧水利解决方案如何助力水利行业实现高效、精准、可持续的管理
  • Vue3学习笔记(n.0)
  • 基于Spring Boot的在线考试系统
  • Day65 代码随想录打卡|回溯算法篇---组合总和II
  • C++ 入门03:函数与作用域
  • 在Linux/Debian/Ubuntu中出现“Could not get lock /var/lib/dpkg/lock-frontend”问题的解决办法
  • odoo中的钩子 Hooks
  • 05.C1W4.Machine Translation and Document Search
  • 计算机网络——数据链路层(点对点协议PPP)
  • 信息安全概述
  • UE5.3-基础蓝图类整理一
  • Python面试题: 如何在 Python 中实现一个线程池?
  • ☺初识c++(语法篇)☺
  • process.env 管理 Vue 项目的环境变量(Vue项目中环境变量的配置及调用)
  • 算法工程师第六天(● 454.四数相加II ● 383. 赎金信 ● 15. 三数之和 ● 18. 四数之和 ● 总结 )
  • 笔记:Newtonsoft.Json 自定义一个根据typeconverter转换的JsonConverter
  • 第241题| 确定极限中参数问题 | 武忠祥老师每日一题