Coder Social home page Coder Social logo

cocosplit_data's Introduction

※※※ Base code ※※※

https://github.com/akarazniewicz/cocosplit / akarazniewicz (coco, train, test split)

  • In the existing code, fix error (confusion between valiation and test dataset) and update no test mode (only split into train and validation dataset).

init enviornment

pip install -r requirements.txt

How to use?

python cocosplit_train_test_valid.py \\  
--annotations {annotationsFile, only Json} \\  
--train_ratio {own train_ratio} \\  
--valid_ratio {own valid_ratio} \\  
--test_ratio {own test_ratio} \\  
--trainJson_name {save fileName, Has a default} \\  
--validJson_name {save fileName, Has a default} \\  
--testJson_name {save fileName, Has a default} \\  
--save_path {choose utput path, Has a default} \\  
--image_path {choose coco dataset image files path, Has a default} \\  
--os {choose your computer operating system, default linux}  
--no_test

example

python cocosplit_train_test_valid.py \\  
--annotations ./target.json \\  // input your target json file path  
--train_ratio 0.8 \\  
--valid_ratio 0.1 \\  
--test_ratio 0.1 \\  
--trainJson_name train.json \\  
--validJson_name valid.json \\  
--testJson_name test.json \\  
--save_path /output \\  
--image_path ./cocoDataset/image \\  
--os window  
python cocosplit_train_test_valid.py \\  
--annotations ./target.json \\  // input your target json file path  
--train_ratio 0.9 \\  
--valid_ratio 0.1 \\  
--trainJson_name train.json \\  
--validJson_name valid.json \\  
--testJson_name test.json \\  
--save_path /output \\  
--image_path ./cocoDataset/image \\  
--os window  
--no_test

what is 'cocosplit_train_test_valid.py' and 'cocosplit_train_test_valid_fileVer.py'

'cocosplit_train_test_valid.py' version is just split json file to train, test, valid file
'cocosplit_train_test_valid_fileVer.py' version is split json file and copy real files to json path

Option information

python cocosplit_train_test_valid.py -h

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.