当前位置:网站首页>[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
边栏推荐
猜你喜欢
随机推荐
Visual low-code system practice based on design draft identification
22.括号生成
你有对象类,我有结构体,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang结构体(struct)的使用EP06
罗彻斯特大学 | 现在是什么序列?蛋白质序列的贝叶斯优化的预训练集成
【无标题】
egg.js中Class constructor BaseContextClass cannot be invoked without ‘new‘解决方法
Unity顶点动画
使用IDEA的PUSH常见问题
Unity image使用长图后 图片很糊
Chip Information|Semiconductor revenue growth expected to slow to 7%, Bluetooth chip demand still growing steadily
Web性能测试模型小结
Shader Graph学习各种特效案例
RedHat红帽RHEL7安装与使用,VMware Workstation16 Pro虚拟机的安装与使用
shell指定参数名传参
hopscotch game
【wpf】拖拽的简单实现
元素的盒子模型+标签的尺寸大小和偏移量+获取页面滚动距离
《GB39732-2020》PDF下载
MySQL最大连接数限制如何修改
【Grpc】报错:status = StatusCode.UNIMPLEMENTED details = ““