Skip to main content

A toolkit for COCO dataset

Project description

COCOSuite

COCOSuite is a comprehensive collection of tools designed to facilitate the management and manipulation of datasets in COCO format.

Tools

Tool Description
coco_merge Merge two COCO datasets into a single one
merge_multiple Allows merging of multiple COCO files into a single dataset
random_split Performs a random division of the dataset into training and validation subsets, configurable in terms of data proportion.
property_split Divides a COCO dataset into training and validation sets according to specific image properties
coco_filter Filters a COCO dataset based on certain criteria

Installation

git clone https://github.com/jorgenusan/cocosuite.git
cd cocosuite
pip3 install -r requirements.txt

Usage

[!IMPORTANT] In all scripts, if no path is specified in the <output_filename> argument and only a name is specified. The resulting file will be created in the input annotations file path

Basic example

python3 /cocosuite/scripts/manipulation/coco_merge.py <annotations_file_1> <annotations_file_2> <output_filename>

config_split

Applies to property_split and coco_filter

python3 /cocosuite/scripts/manipulation/property_split.py <annotations_file> <config_split>

For these scripts you have to pass a configuration file with the criteria for separating the data in the case of property_split and the criteria for filtering in the case of coco_filter.

Here is an example for each of these cases:

  1. property_split

     "criteria": {
       "file_name": ["image1", "image2"],
       "height": [480]
     },
     "match_all": true
    
  2. coco_filter

    "filter": {
      "file_name": ["image1", "image2"],
      "height": [480]
    },
    "match_all": true
    

[!NOTE] the match_all property, when set to true means that both properties have to match in order to filter or split a new file.
If set to false, it filters or splits for each property.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cocosuite-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cocosuite-0.1.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file cocosuite-0.1.0.tar.gz.

File metadata

  • Download URL: cocosuite-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for cocosuite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b979160b2b5e47c996bdc20af6d7ebd0078f06e8394790c2dc79b8fe2470a557
MD5 637fbad149d01e0114873888f13865b5
BLAKE2b-256 2c8e6d8226bca7378d0de03d4c24353bec3b8be759514baf49408655128189fe

See more details on using hashes here.

File details

Details for the file cocosuite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cocosuite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for cocosuite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33c28e383b5ce9e9c09ff5b50bddfe43fcfb3f647e882cb643cdb83adea0823a
MD5 79c12b661263afe47de3f2d9425a0b3f
BLAKE2b-256 868c539f97438b06b96e5d7c5ad10121e3f181187a9983ca8403a272ece36589

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page