Giter Club home page Giter Club logo

cvdata's People

Contributors

dependabot[bot] avatar edumotya avatar monocongo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cvdata's Issues

Make the KITTI IDs file argument optional

Make the KITTI IDs file argument optional when converting to KITTI format. Currently, the argument is optional at the CLI level but if converting to KITTI then it's expected to be present. In some cases, it's not important to have a file containing file IDs corresponding to a dataset with KITTI annotations, and therefore we should allow for this use case without requiring a KITTI IDs file argument.

Add label removal to the clean module/CLI

In order to remove labels/bounding boxes from annotations add an optional argument to the CLI and corresponding functions of the clean.py module to specify labels we want to be removed.

Register package with PyPI

Build and upload to PyPI:

$ rm -rf dist
$ python setup.py sdist bdist_wheel
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
$ twine upload dist/*

Add sanitize script/module to clean up datasets

  • convert images from PNG to JPG
  • relabel annotations
  • resize bounding boxes if dimensions don't match
  • clip bounding boxes if too large for dimensions
  • reverse max and min in bounding boxes if min > max
  • combine multiple/duplicate annotations for the same image
  • remove files if no image/annotation match
  • remove files if no bounding boxes in annotation file

Add function and corresponding CLI option(s) for conversion to TFRecords

Create a function and corresponding CLI option(s) for the conversion of datasets annotated in KITTI and/or PASCAL format to TFRecords that are suitable as input for TensorFlow object detection models. This will likely involve adding functions to convert.py, pascal_to_tfrecord() and/or kitti_to_tfrecord().

Module/script for annotation conversion

Create a module with CLI for the conversion of dataset annotation files to/from various formats. Formats we intend to initially support are PASCAL VOC, Darknet, COCO, and TFRecord.

Filter module

Add a module with CLI for filtering a dataset to contain only a certain set of class labels.

An example use case:
A dataset with a lop-sided distribution of annotated images:
dog: 80k images/annotations
cat: 10k images/annotations
panda: 3k images/annotations
We'd like to have a more evenly distributed dataset so to filter down the dataset to a maximum of 5000 annotated images (bounding boxes) per image class we will provide a module with a CLI like so:

$ python filter.py --format kitti --src_images /data/original/images \
>   --src_annotations /data/original/kitti \
>   --dest_images /data/filtered/images \
>   --dest_annotations /data/filtered/kitti \
>   --boxes_per_class dog:5000 cat:5000 panda:5000

We might instead have a maximum count argument but the above boxes per class will allow for finer-grained filtering, in case there are various numbers of boxes we want per class or if we only want a subset of the available image classes.

Update README with usage info for creating train/val/test splits

To use the cvdata.split module we can invoke it from CLI like so:

$ cd ${CVDATA_HOME}
$ python cvdata.split.py --annotations_dir /data/rifle/kitti/label_2 \
> --images_dir /data/rifle/kitti/image_2 \
> --train_annotations_dir /data/rifle/split/kitti/trainval/label_2 \
> --train_images_dir /data/rifle/split/kitti/trainval/image_2 \
> --val_annotations_dir /data/rifle/split/kitti/trainval/label_2 \
> --val_images_dir /data/rifle/split/kitti/trainval/image_2 \
> --test_annotations_dir /data/rifle/split/kitti/test/label_2 \
> --test_images_dir /data/rifle/split/kitti/test/image_2 \
> --format kitti --copy

Add analysis for dataset

Add script/module for analysis of a dataset.

  • number of image classes (labels)
  • count of labels (per label)
  • train/val/test percentages
  • file IDs for each label

Update the splitter module

  • a single argument for the split percentages, with float percentage values combined in a single colon-separated string i.e. 0.7:0.2:0.1
  • rename create_split_files to create_split_files_darknet since it's only applicable for Darknet-related datasets
  • combine the --copy and --no_copy arguments into a single --move argument which defaults to false (i.e. only move files if --move is specified)

Darknet santization using wrong bounding box conception

Within the module clean.py we're checking the min/max bounding boxes for Darknet using min/max X/Y values as with KITTI/PASCAL. Instead, we need to modify it to use the actual Darknet bounding box of center X/Y and box width/height.

Make splitting optional in conversion functions

Currently, there is a default 0.7/0.2/0.1 train/valid/test split for several conversion functions. Make this optional so as to facilitate using the conversion functions on datasets that are already split.

Add script/module for applying an exclusion filter

Provide a script/module that allows a user to apply a list of files to be excluded from a dataset. Use CLI arguments for the annotation format, the directory for images, and associated annotations (either directory or CSV file).

Darknet labels file write bug

The Darknet labels file is being rewritten at every file iteration, it needs to come out of the inner (per file) loop.

New recipe/script for people/vehicles/weapons dataset

Add a recipe script for creating a dataset including people (person image class), vehicles (Car and Truck image classes), and weapons (Handgun and Rifle and Shotgun label classes) from OpenImages plus a handgun dataset from University of Granada for weapons ("hanndgun" class). Optional images and labels from custom directory locations.

Fix broken tests

Somehow the tests for resizing have gone bad. Fix these (and try to determine where/how they went off the rails).

Create class for performing creation and manipulation of datasets

Create a dataset API that allows a user to specify

  • download source(s) (OpenImages, COCO, private repo, etc.)
  • labels
  • resize dimensions
  • train/valid/test split
  • output directory

Extend the PyTorch Dataset class, maintain dataset info (bounding boxes, file locations, etc. internally using a pandas DataFrame, read/write info in CSV files similar to OpenImages, etc.

Update version and upload to PyPI

  1. Update version in setup.py and __init__.py
  2. Build and upload to PyPI:
$ rm -rf dist
$ python setup.py sdist bdist_wheel
$ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
$ twine upload dist/*

Update splitter module to allow for image-only splits

The current CLI for the split module is tailored for datasets (i.e. collections of images and corresponding annotations). We will extend the CLI to allow for splits of images only, essentially triggered by an absence of annotation-related CLI arguments.

Add module to perform renaming of files

In order to bulk rename files, we will add a module that can get all files in a directory and rename them using a prefix and enumeration. The initial use case is when we have a directory full of image files with disparate names and we want them to all be uniformly named, i.e. abc_000000.jpg, abc_000001.jpg, abc_000002.jpg, etc.

Script/module for conversion of dataset into OpenImages CSV for SSD training

To facilitate training an SSD/MobileNet model we should provide a script to convert a dataset to the OpenImages CSV format and splits suggested by the open_images_downloader.py script used in the example for retraining the model on data from the OpenImages dataset.

The result should be three separate directories for the training/validation/testing images (default to a 70/20/10 split) and three corresponding CSV files with the following columns header:

ImageID,Source,LabelName,Confidence,XMin,XMax,YMin,YMax,IsOccluded,IsTruncated,IsGroupOf,IsDepiction,IsInside,id,ClassName

For example:

<data_dir>
    test
    train
    validation
    sub-test-annotations-bbox.csv
    sub-train-annotations-bbox.csv
    sub-validation-annotations-bbox.csv

This is closely related to issue #3, and as such we may provide this as a conversion function such as convert_pascal_to_openimages(images_dir, pascal_dir, openimages_dir, copy_images=True).

Add citation information

Add a BibTeX entry in the README and documentation. For example:

@misc {climate_indices,
    author = "James Adams",
    title  = "climate_indices, an open source Python library providing reference implementations of commonly used climate indices",
    url    = "https://github.com/monocongo/climate_indices",
    month  = "may",
    year   = "2017--"
}

Consolidate exclusions

It's not really practical to have exclusions within separate files, so we'll consolidate into a single exclusions.txt file.

Add visualization for TFRecords

TFRecord files can come in various formats depending on how they're written (there's no standard layout from what I can tell). We'll first provide support for the TFRecord files created by the NVIDIA TLT framework since those are the ones we're typically using day-to-day.

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.