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.
G-NIA model from "Single Node Injection Attack against Graph Neural Networks" (CIKM 2021)

Single Node Injection Attack against Graph Neural Networks This repository is our Pytorch implementation of our paper: Single Node Injection Attack ag

Shuchang Tao 18 Nov 21, 2022
Object Depth via Motion and Detection Dataset

ODMD Dataset ODMD is the first dataset for learning Object Depth via Motion and Detection. ODMD training data are configurable and extensible, with ea

Brent Griffin 172 Dec 21, 2022
Code for "Graph-Evolving Meta-Learning for Low-Resource Medical Dialogue Generation". [AAAI 2021]

Graph Evolving Meta-Learning for Low-resource Medical Dialogue Generation Code to be further cleaned... This repo contains the code of the following p

Shuai Lin 29 Nov 01, 2022
Code for SyncTwin: Treatment Effect Estimation with Longitudinal Outcomes (NeurIPS 2021)

SyncTwin: Treatment Effect Estimation with Longitudinal Outcomes (NeurIPS 2021) SyncTwin is a treatment effect estimation method tailored for observat

Zhaozhi Qian 3 Nov 03, 2022
190 Jan 03, 2023
[CVPRW 21] "BNN - BN = ? Training Binary Neural Networks without Batch Normalization", Tianlong Chen, Zhenyu Zhang, Xu Ouyang, Zechun Liu, Zhiqiang Shen, Zhangyang Wang

BNN - BN = ? Training Binary Neural Networks without Batch Normalization Codes for this paper BNN - BN = ? Training Binary Neural Networks without Bat

VITA 40 Dec 30, 2022
YOLOX_AUDIO is an audio event detection model based on YOLOX

YOLOX_AUDIO is an audio event detection model based on YOLOX, an anchor-free version of YOLO. This repo is an implementated by PyTorch. Main goal of YOLOX_AUDIO is to detect and classify pre-defined

intflow Inc. 77 Dec 19, 2022
Vis2Mesh: Efficient Mesh Reconstruction from Unstructured Point Clouds of Large Scenes with Learned Virtual View Visibility ICCV2021

Vis2Mesh This is the offical repository of the paper: Vis2Mesh: Efficient Mesh Reconstruction from Unstructured Point Clouds of Large Scenes with Lear

71 Dec 25, 2022
Official implementation of "Can You Spot the Chameleon? Adversarially Camouflaging Images from Co-Salient Object Detection" in CVPR 2022.

Jadena Official implementation of "Can You Spot the Chameleon? Adversarially Camouflaging Images from Co-Salient Object Detection" in CVPR 2022. arXiv

Qing Guo 13 Nov 29, 2022
Optimizing DR with hard negatives and achieving SOTA first-stage retrieval performance on TREC DL Track (SIGIR 2021 Full Paper).

Optimizing Dense Retrieval Model Training with Hard Negatives Jingtao Zhan, Jiaxin Mao, Yiqun Liu, Jiafeng Guo, Min Zhang, Shaoping Ma 🔥 News 2021-10

Jingtao Zhan 99 Dec 27, 2022
This repository is an unoffical PyTorch implementation of Medical segmentation in 3D and 2D.

Pytorch Medical Segmentation Read Chinese Introduction:Here! Recent Updates 2021.1.8 The train and test codes are released. 2021.2.6 A bug in dice was

EasyCV-Ellis 618 Dec 27, 2022
An End-to-End Machine Learning Library to Optimize AUC (AUROC, AUPRC).

Logo by Zhuoning Yuan LibAUC: A Machine Learning Library for AUC Optimization Website | Updates | Installation | Tutorial | Research | Github LibAUC a

Optimization for AI 176 Jan 07, 2023
MQBench: Towards Reproducible and Deployable Model Quantization Benchmark

MQBench: Towards Reproducible and Deployable Model Quantization Benchmark We propose a benchmark to evaluate different quantization algorithms on vari

494 Dec 29, 2022
Graph Robustness Benchmark: A scalable, unified, modular, and reproducible benchmark for evaluating the adversarial robustness of Graph Machine Learning.

Homepage | Paper | Datasets | Leaderboard | Documentation Graph Robustness Benchmark (GRB) provides scalable, unified, modular, and reproducible evalu

THUDM 66 Dec 22, 2022
Pytorch implementation of Value Iteration Networks (NIPS 2016 best paper)

VIN: Value Iteration Networks A quick thank you A few others have released amazing related work which helped inspire and improve my own implementation

Kent Sommer 297 Dec 26, 2022
Pytorch implementation for the paper: Contrastive Learning for Cold-start Recommendation

Contrastive Learning for Cold-start Recommendation This is our Pytorch implementation for the paper: Yinwei Wei, Xiang Wang, Qi Li, Liqiang Nie, Yan L

45 Dec 13, 2022
Code for "Learning From Multiple Experts: Self-paced Knowledge Distillation for Long-tailed Classification", ECCV 2020 Spotlight

Learning From Multiple Experts: Self-paced Knowledge Distillation for Long-tailed Classification Implementation of "Learning From Multiple Experts: Se

27 Nov 05, 2022
Official repository of "DeepMIH: Deep Invertible Network for Multiple Image Hiding", TPAMI 2022.

DeepMIH: Deep Invertible Network for Multiple Image Hiding (TPAMI 2022) This repo is the official code for DeepMIH: Deep Invertible Network for Multip

Junpeng Jing 67 Nov 22, 2022
aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)

Bayesian Methods for Hackers Using Python and PyMC The Bayesian method is the natural approach to inference, yet it is hidden from readers behind chap

Cameron Davidson-Pilon 25.1k Jan 02, 2023
PyTorch implementation of Interpretable Explanations of Black Boxes by Meaningful Perturbation

PyTorch implementation of Interpretable Explanations of Black Boxes by Meaningful Perturbation The paper: https://arxiv.org/abs/1704.03296 What makes

Jacob Gildenblat 322 Dec 17, 2022