A python package to perform same transformation to coco-annotation as performed on the image.

Overview

coco-transform-util

A python package to perform same transformation to coco-annotation as performed on the image.

Installation

Way 1

$ git clone https://git.cglcloud.com/ILC-APAC/coco-transform-util.git
$ cd coco-transform-util
$ python3 setup.py install

Way 2

$ pip3 install git+https://git.cglcloud.com/ILC-APAC/coco-transform-util.git
<<< Username: <[email protected]>
<<< Password: <personal access token or SSH key>

Personal Access token looks like this 83b318cg875a5g302e5fdaag74afc8ceb6a91a2e.

Reference: How to generate Personal Access token

Check installation

import ctu
print(ctu.__version__)

Benefits and Use Cases

  1. Faster Model Training: Decrease the size of images and accordingly its annotation will be changed using this.
  2. Flexibility: Rescaling of images and annotations to meet the need of Model/Framework.
  3. Cost Saving: Lesser Computation requirement as images can be downscaled.
  4. Interpretability: Annotation Visualization is also a part of this package.
  5. Data Augmentation: <more practical in future>
  6. Ability to handle other cases: Added Functionality such as cropping or padding of the annotation can help in multiple other cases such as:
    • cropping out each object image & annotation from an original image
    • cropping unnecessary area to zoom in on some particular area.
    • converting images to 1:1 aspect ratio by using padding and/or cropping.

How to use it?

Core

There are four core modules inside that helps in performing operations on COCO Annotation. These can imported as shown below:

from ctu import WholeCoco2SingleImgCoco, Coco2CocoRel, CocoRel2CocoSpecificSize, AggreagateCoco  

It's recommended that you have look at samples/example_core_modules.py to understand and explore how to use these.

Wrapper

Making use of wrappers can also come in handly to perform multiple operations in a much simpler and interpretable manner using the functions provided below:

from ctu import (
    sample_modif_step_di, get_modif_imag, get_modif_coco_annotation, 
    accept_and_process_modif_di, ImgTransform, Visualize
)

It's recommended that you have look at samples/example_highlevel_function.py to understand and explore how to use these.

Some sample data has also been provided with this package at example_data/* to explore these functionalities.

Demo / Sample

A sample HTML created from Jupyter-Notebook, contating some sample results has been added to the path samples/Demo-SampleOutput.html.

Version History

  • v0.1: Core Modules: WholeCoco2SingleImgCoco, Coco2CocoRel, CocoRel2CocoSpecificSize. External Dependency on AMLEET package.
  • v0.2: Removed the dependency on AMLEET package. Develop Core Module: AggreagateCoco. Addition of field "area" under "annotations" in coco.
  • v0.3: Completed: Remove the out of frame coordinates in annotation. Update & add fields in "annotation" > "images". Ability to create transparent and general mask create_mask. In Development: Ability to export transformed image, mask and annotation per image wise and as a whole too.

Future

  • Update the image fields in "images" key. (done)
  • Crop out the annotation which are out-of-frame based on recent image shape. (done)
  • Annotation Visualization + Mask creation can become a core feature to this library. (done)
  • Rotate 90 degree left/right.
  • Flip horizontally or vertically.
  • COCO to other annotation format can also be a feature to this package.
FL-WBC: Enhancing Robustness against Model Poisoning Attacks in Federated Learning from a Client Perspective

FL-WBC: Enhancing Robustness against Model Poisoning Attacks in Federated Learning from a Client Perspective Official implementation of "FL-WBC: Enhan

Jingwei Sun 26 Nov 28, 2022
Neural Turing Machines (NTM) - PyTorch Implementation

PyTorch Neural Turing Machine (NTM) PyTorch implementation of Neural Turing Machines (NTM). An NTM is a memory augumented neural network (attached to

Guy Zana 519 Dec 21, 2022
Pytorch Implementation of Interaction Networks for Learning about Objects, Relations and Physics

Interaction-Network-Pytorch Pytorch Implementraion of Interaction Networks for Learning about Objects, Relations and Physics. Interaction Network is a

117 Nov 05, 2022
MVGCN: a novel multi-view graph convolutional network (MVGCN) framework for link prediction in biomedical bipartite networks.

MVGCN MVGCN: a novel multi-view graph convolutional network (MVGCN) framework for link prediction in biomedical bipartite networks. Developer: Fu Hait

13 Dec 01, 2022
PyTorch deep learning projects made easy.

PyTorch Template Project PyTorch deep learning project made easy. PyTorch Template Project Requirements Features Folder Structure Usage Config file fo

Victor Huang 3.8k Jan 01, 2023
Understanding Convolution for Semantic Segmentation

TuSimple-DUC by Panqu Wang, Pengfei Chen, Ye Yuan, Ding Liu, Zehua Huang, Xiaodi Hou, and Garrison Cottrell. Introduction This repository is for Under

TuSimple 585 Dec 31, 2022
UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac protocols on unmanned aerial vehicle networks.

UAV-Networks Simulator - Autonomous Networking - A.A. 20/21 UAV-Networks-Routing is a Python simulator for experimenting routing algorithms and mac pr

0 Nov 13, 2021
Code for ACL2021 long paper: Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Bases

LANKA This is the source code for paper: Knowledgeable or Educated Guess? Revisiting Language Models as Knowledge Bases (ACL 2021, long paper) Referen

Boxi Cao 30 Oct 24, 2022
This repo is about to create the Streamlit application for given ML model.

HR-Attritiion-using-Streamlit This repo is about to create the Streamlit application for given ML model. Problem Statement: Managing peoples at workpl

Pavan Giri 0 Dec 10, 2021
Learning Saliency Propagation for Semi-supervised Instance Segmentation

Learning Saliency Propagation for Semi-supervised Instance Segmentation PyTorch Implementation This repository contains: the PyTorch implementation of

Berkeley DeepDrive 68 Oct 18, 2022
Nodule Generation Algorithm Baseline and template code for node21 generation track

Nodule Generation Algorithm This codebase implements a simple baseline model, by following the main steps in the paper published by Litjens et al. for

node21challenge 10 Apr 21, 2022
DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Object Detection

DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Object Detection Code for our Paper DAFNe: A One-Stage Anchor-Free Deep Model for Oriented Obje

Steven Lang 58 Dec 19, 2022
People movement type classifier with YOLOv4 detection and SORT tracking.

Movement classification The goal of this project would be movement classification of people, in other words, walking (normal and fast) and running. Yo

4 Sep 21, 2021
[CVPR 2022] "The Principle of Diversity: Training Stronger Vision Transformers Calls for Reducing All Levels of Redundancy" by Tianlong Chen, Zhenyu Zhang, Yu Cheng, Ahmed Awadallah, Zhangyang Wang

The Principle of Diversity: Training Stronger Vision Transformers Calls for Reducing All Levels of Redundancy Codes for this paper: [CVPR 2022] The Pr

VITA 16 Nov 26, 2022
The official codes of "Semi-supervised Models are Strong Unsupervised Domain Adaptation Learners".

SSL models are Strong UDA learners Introduction This is the official code of paper "Semi-supervised Models are Strong Unsupervised Domain Adaptation L

Yabin Zhang 26 Dec 26, 2022
CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery

CoANet: Connectivity Attention Network for Road Extraction From Satellite Imagery This paper (CoANet) has been published in IEEE TIP 2021. This code i

Jie Mei 53 Dec 03, 2022
Proof of concept GnuCash Webinterface

Proof of Concept GnuCash Webinterface This may one day be a something truly great. Milestones [ ] Browse accounts and view transactions [ ] Record sim

Josh 14 Dec 28, 2022
ContourletNet: A Generalized Rain Removal Architecture Using Multi-Direction Hierarchical Representation

ContourletNet: A Generalized Rain Removal Architecture Using Multi-Direction Hierarchical Representation (Accepted by BMVC'21) Abstract: Images acquir

10 Dec 08, 2022
Motion planning algorithms commonly used on autonomous vehicles. (path planning + path tracking)

Overview This repository implemented some common motion planners used on autonomous vehicles, including Hybrid A* Planner Frenet Optimal Trajectory Hi

Huiming Zhou 1k Jan 09, 2023
🤖 Project template for your next awesome AI project. 🦾

🤖 AI Awesome Project Template 👋 Template author You may want to adjust badge links in a README.md file. 💎 Installation with pip Installation is as

Wiktor Łazarski 18 Nov 23, 2022