Giter Site home page Giter Site logo

shikequan / dota2voc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from miao404/dota2voc

0.0 0.0 0.0 17 KB

将DOTA数据集制作成VOC格式,包含类别选择,图片分割,标签抓取,txt2xml,重命名,索引制作等六个步骤。

Python 100.00%

dota2voc's Introduction

DOTA数据集处理

选取需要类别 → 图片裁剪 → 标签数据自动抓取 → 格式转换txt2xml → 修改图片和标签文件名称 → 生成各类数据集索引文件

1. SelectShip.py

从有15种类别的DOTA数据集中筛选出需要的类别

catogory = ['ship'] # 指定类别的名称,指定多类别逗号隔开

2.ImgSplit.py

数据集影像切割为1000*1000(本操作可无视)

不足1000的高或宽在在下或右方向补齐(左上角不动,因为标签数据原点为左上角)

3.txtGrab.py

标签数据自动抓取

第14行 name = im_list[:-4]

如果图像后缀为.png .jpg等则为-4,若图像后缀为.tiff则为-5

4.txt2xml.py

数据格式转换 / 两种矩形框的xml可选

hbb(水平矩形框):xmin ymin xmax ymax

obb(旋转矩形框):x0 y0 x1 y1 x2 y2 x3 y3

根据需要选择(如果生成obb,修改260行和266行的hbb=True为False)

5.Rename.py

批量修改文件夹中文件名为(000000)格式,方便直接替换VOC数据集进行训练

6.ImageSets.py

制作ImageSets文件夹下Main文件夹中的4个文件(test.txt、train.txt、trainval.txt、val.txt)

test.txt 测试集 / train.txt 训练集 / val.txt 验证集 / trainval.txt:训练和验证集

在原始VOC2007数据集中,trainval大约占整个数据集的50%,test大约为整个数据集的50%;train大约是trainval的50%,val大约为trainval的50%,按照此标准生成txt文件

dota2voc's People

Contributors

miao404 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.