当前位置:网站首页>[Syntax sugar] About the mapping of category strings to category numeric ids
[Syntax sugar] About the mapping of category strings to category numeric ids
2022-08-10 02:30:00 【Master Luwen】
In https://github.com/ming71/DAL, dota_dataset.py
:
self.classes = ('__background__', 'plane', 'ship', 'storage-tank', 'baseball-diamond','tennis-court', 'basketball-court', 'ground-track-field', 'harbor','bridge', 'large-vehicle', 'small-vehicle', 'helicopter', 'roundabout','soccer-ball-field' , 'swimming-pool'span>)self.num_classes = len(self.classes)self.class_to_ind = dict(zip(self.classes, range(self.num_classes)))span>
The conversion from category to digital id only takes one line, wonderful, zip and dict can work together like this
边栏推荐
- 【报错】ModuleNotFoundError: No module named ‘paramiko‘
- [语法糖] 关于类别字符串到类别数字id的映射
- Pyscript,创建一个能执行crud操作的网页应用
- Linux(Centos7)服务器中配置Mysql主从数据库,以及数据库的安装,防火墙操作
- Sikuli's Automated Testing Technology Based on Pattern Recognition
- 什么是持续测试?
- 华为HCIE云计算之FC添加ipsan数据存储
- 小程序实现搜索功能续
- 【wpf】自定义事件总结(Action, EventHandler)
- In the 2022 gold, nine, silver and ten work tide, how can I successfully change jobs and get a high salary?
猜你喜欢
小程序中计算距离信息
[论文阅读] Multimodal Unsupervised Image-to-Image Translation
Unity editor extension interface uses List
[论文阅读] Diverse Image-to-Image Translation via Disentangled Representations
C# rounding MidpointRounding.AwayFromZero
商业模式及其 SubDAO 深入研究
即时通讯开发如何撸一个WebSocket服务器
开发IM即时通讯容易吗?需要什么技术
芯片资讯|半导体收入增长预计将放缓至 7%,蓝牙芯片需求依然稳步增长
小程序实现搜索功能续
随机推荐
Solidity最强对手:MOVE语言及新公链崛起
【论文笔记】基于深度学习的机器人抓取虚拟仿真实验教学系统
首次在我们的centos上安装MySQL
SonarQube升级记录:7.8->7.9->8.9
小程序中计算距离信息
破产企业的职工退休怎么办?
[论文阅读] Multimodal Unsupervised Image-to-Image Translation
OptiFDTD应用:纳米盘型谐振腔等离子体波导滤波器
JDBC数据库连接池练习题
开发IM即时通讯容易吗?需要什么技术
力扣每日一题-第51天-744. 寻找比目标字母大的最小字母
Unity碰撞和触发
Initial attempt at UI traversal
Not, even the volume of the king to write code in the company are copying and pasting it reasonable?
《GB39732-2020》PDF下载
什么是一网统管?终于有人讲明白了
【SSRF漏洞】实战演示 超详细讲解
HCIP——综合交换实验
即时通讯开发如何撸一个WebSocket服务器
不是吧,连公司里的卷王写代码都复制粘贴,这合理?