• Stars
    star
    112
  • Rank 312,240 (Top 7 %)
  • Language
    Jupyter Notebook
  • License
    MIT License
  • Created almost 6 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Convert Open Images annotations into MS Coco format to make it a drop in replacement

openimages2coco

Convert Open Images annotations into MS Coco format to make it a drop in replacement.

Functionality

  • convert_annotations.py will load the original .csv annotation files from Open Images, convert the annotations into the list/dict based format of MS Coco annotations and store them as a .json file in the same folder.

  • convert_predictions.py loads a .json file with predictions in the coco format and save them as .csv in the OpenImages prediction fromat at the same location.

Installation

Download the CocoAPI from https://github.com/cocodataset/cocoapi
Install Coco API:

cd PATH_TO_COCOAPI/PythonAPI
make install

Download Open Images from https://storage.googleapis.com/openimages/web/download.html
-> Store the images in three folders called: train, val and test
-> Store the annotations for all three splits in a separate folder called: annotations

Converting Annotations

Run conversion of bounding box annotations:

python3 convert_annotations.py -p PATH_TO_OPENIMAGES --task bbox

The convert instance masks to the Coco panoptic format. The masks have to be placed in annotations/SPLIT_masks/

python3 convert_annotations.py -p PATH_TO_OPENIMAGES --task panoptic

Currently adding the instance masks to the annotations as done for coco is not supported becasue the resulting json file would be extremely large.

Converting Predictions

Run conversion of bounding box predictions:

python3 convert_predictions.py -p PATH_TO_PREDICTIONS --subset validation

The subset is necessary to get the correct image sizes. Alternatively they can be inferred directly from the images:

python3 convert_predictions.py -p PATH_TO_PREDICTIONS --image_dir PATH_TO_IMAGES

Currently only bounding box predictions are supported.

Dataset Versions

The toolkit supports multiple versions of the dataset including v4, v5, v6 and challenge_2019. For example the bbox annotations of challenge_2019 can be converted like:

python3 convert_annotations.py -p PATH_TO_OPENIMAGES --version challenge_2019 --task bbox

For panoptica nnotations the masks have to be placed in annotations/challenge_2019_$SPLIT_masks/ before running:

python3 convert_annotations.py -p PATH_TO_OPENIMAGES --version challenge_2019 --task panoptic

Note, that different annotation files have to be downloaded to annotations for this purpose. The files for the challenge_2019 set can be found here: https://storage.googleapis.com/openimages/web/challenge2019_downloads.html

Using Converted Annotations

The generated annotations can be loaded and used with the standard MS Coco tools:

from pycocotools.coco import COCO

# Example for the validation set
openimages = COCO('PATH_TO_OPENIMAGES/annotations/openimages_v6_val_bbox.json')

More Repositories

1

foolbox

A Python toolbox to create adversarial examples that fool neural networks in PyTorch, TensorFlow, and JAX
Python
2,733
star
2

imagecorruptions

Python package to corrupt arbitrary images.
Python
409
star
3

siamese-mask-rcnn

Siamese Mask R-CNN model for one-shot instance segmentation
Jupyter Notebook
346
star
4

model-vs-human

Benchmark your model on out-of-distribution datasets with carefully collected human comparison data (NeurIPS 2021 Oral)
Python
333
star
5

robust-detection-benchmark

Code, data and benchmark from the paper "Benchmarking Robustness in Object Detection: Autonomous Driving when Winter is Coming" (NeurIPS 2019 ML4AD)
Jupyter Notebook
182
star
6

stylize-datasets

A script that applies the AdaIN style transfer method to arbitrary datasets
Python
155
star
7

robustness

Robustness and adaptation of ImageNet scale models. Pre-Release, stay tuned for updates.
Python
128
star
8

slow_disentanglement

Towards Nonlinear Disentanglement in Natural Data with Temporal Sparse Coding
Jupyter Notebook
72
star
9

frequency_determines_performance

Code for the paper: "No Zero-Shot Without Exponential Data: Pretraining Concept Frequency Determines Multimodal Model Performance" [NeurIPS'24]
Jupyter Notebook
71
star
10

AnalysisBySynthesis

Adversarially Robust Neural Network on MNIST.
Python
64
star
11

game-of-noise

Trained model weights, training and evaluation code from the paper "A simple way to make neural networks robust against diverse image corruptions"
Python
62
star
12

decompose

Blind source separation based on the probabilistic tensor factorisation framework
Python
43
star
13

adversarial-vision-challenge

NIPS Adversarial Vision Challenge
Python
41
star
14

CiteME

CiteME is a benchmark designed to test the abilities of language models in finding papers that are cited in scientific texts.
Python
35
star
15

InDomainGeneralizationBenchmark

Python
33
star
16

robust-vision-benchmark

Robust Vision Benchmark
Python
22
star
17

docker

Information and scripts to run and develop the Bethge Lab Docker containers
Makefile
20
star
18

slurm-monitoring-public

Monitor your high performance infrastructure configured over slurm using TIG stack
Python
19
star
19

google_scholar_crawler

Crawl Google scholar publications and authors
Python
12
star
20

DataTypeIdentification

Code for the ICLR'24 paper: "Visual Data-Type Understanding does not emerge from Scaling Vision-Language Models"
11
star
21

magapi-wrapper

Wrapper around Microsoft Academic Knowledge API to retrieve MAG data
Python
10
star
22

testing_visualizations

Code for the paper " Exemplary Natural Images Explain CNN Activations Better than Feature Visualizations"
Python
10
star
23

docker-deeplearning

Development of new unified docker container (WIP)
Python
9
star
24

sort-and-search

Code for the paper: "Efficient Lifelong Model Evaluation in an Era of Rapid Progress" [NeurIPS'24]
Python
9
star
25

notorious_difficulty_of_comparing_human_and_machine_perception

Code for the three case studies: Closed Contour Detection, Synthetic Visual Reasoning Test, Recognition Gap
Jupyter Notebook
8
star
26

lifelong-benchmarks

Benchmarks introduced in the paper: "Lifelong Benchmarks: Efficient Model Evaluation in an Era of Rapid Progress"
8
star
27

tools

Shell
6
star
28

docker-jupyter-deeplearning

Docker Image with Jupyter for Deep Learning (Caffe, Theano, Lasagne, Keras)
6
star
29

docker-xserver

Docker Image with Xserver, OpenBLAS and correct user settings
Shell
2
star
30

gym-Atari-SpaceInvaders-V0

Python
1
star
31

bwki-weekly-tasks

BWKI Task of the week
Jupyter Notebook
1
star