当前位置:网站首页>[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协议实现文件上传与下载

商业模式及其 SubDAO 深入研究

【kali-密码攻击】(5.2.1)密码分析:Hash Identifier(哈希识别)

C# 四舍五入 MidpointRounding.AwayFromZero

Unity reports Unsafe code may only appear if compiling with /unsafe. Enable “Allow ‘unsafe’ code” in Pla

Teach you how to write performance test cases

元素的盒子模型+标签的尺寸大小和偏移量+获取页面滚动距离

芯片资讯|半导体收入增长预计将放缓至 7%,蓝牙芯片需求依然稳步增长

RedHat红帽RHEL7安装与使用,VMware Workstation16 Pro虚拟机的安装与使用

初步认识对象
随机推荐
oracle的数据导入导出
Not, even the volume of the king to write code in the company are copying and pasting it reasonable?
y92.第六章 微服务、服务网格及Envoy实战 -- Envoy基础(三)
人际关系不仅要“存”,更要“激活”!
Shader Graph学习各种特效案例
[Turn] Typora_Markdown_ picture title (caption)
商业模式及其 SubDAO 深入研究
【报错】ModuleNotFoundError: No module named ‘paramiko‘
[论文阅读] Diverse Image-to-Image Translation via Disentangled Representations
什么是一网统管?终于有人讲明白了
22.括号生成
[QNX Hypervisor 2.2用户手册]10.14 smmu
你有对象类,我有结构体,Go lang1.18入门精炼教程,由白丁入鸿儒,go lang结构体(struct)的使用EP06
【内存管理概述 Objective-C语言】
数据建模已死,真的吗?
GB28181 sip和RTSP(Real-Time Streaming Protocol)实时流控制协议
[Swoole Series 3.5] Process Pool and Process Manager
破产企业的职工退休怎么办?
Linux(Centos7)服务器中配置Mysql主从数据库,以及数据库的安装,防火墙操作
C# rounding MidpointRounding.AwayFromZero