当前位置:网站首页>[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
边栏推荐
- 高压之下,必有懦夫
- 多线程之自定义线程池
- 元素的盒子模型+标签的尺寸大小和偏移量+获取页面滚动距离
- 基于FTP协议实现文件上传与下载
- Aptos 深度解读:机遇、挑战与风险
- 芯片资讯|半导体收入增长预计将放缓至 7%,蓝牙芯片需求依然稳步增长
- Sikuli 基于图形识别的自动化测试技术
- Experimental support for decorators may change in future releases.Set the "experimentalDecorators" option in "tsconfig" or "jsconfig" to remove this warning
- egg.js中Class constructor BaseContextClass cannot be invoked without ‘new‘解决方法
- 进程管理和任务管理
猜你喜欢
随机推荐
CMake 编译运行dpdk项目程序
3511. 倒水问题
unity 报错 Unsafe code may only appear if compiling with /unsafe. Enable “Allow ‘unsafe‘ code“ in Pla
[LeetCode] Find the sum of the numbers from the root node to the leaf node
shell指定参数名传参
夏克-哈特曼波前传感器
y92.第六章 微服务、服务网格及Envoy实战 -- Envoy基础(三)
【论文笔记】基于深度学习的机器人抓取虚拟仿真实验教学系统
Sikuli's Automated Testing Technology Based on Pattern Recognition
商业模式及其 SubDAO 深入研究
Problems and solutions related to Chinese character set in file operations in ABAP
20220809-PotPlayer如何设置默认字体色-设置默认字体色的方法
芯片资讯|半导体收入增长预计将放缓至 7%,蓝牙芯片需求依然稳步增长
Shader Graph learns various special effects cases
UI遍历的初步尝试
JDBC数据库连接池练习题
Solve the problem of sed replacement text containing special characters such as "/" and "#"
FILE结构体在stdio.h头文件源码里的详细代码
万字总结:分布式系统的38个知识点
Unity顶点动画






![[论文阅读] Multimodal Unsupervised Image-to-Image Translation](/img/a2/78fd81046cc7cde79141a749c0647e.jpg)


