Object detection on multiple datasets with an automatically learned unified label space.

Overview

Simple multi-dataset detection

An object detector trained on multiple large-scale datasets with a unified label space; Winning solution of ECCV 2020 Robust Vision Challenges.

Simple multi-dataset detection,
Xingyi Zhou, Vladlen Koltun, Philipp Krähenbühl,
arXiv technical report (arXiv 2102.13086)

Contact: [email protected]. Any questions or discussions are welcomed!

Abstract

How do we build a general and broad object detection system? We use all labels of all concepts ever annotated. These labels span diverse datasets with potentially inconsistent taxonomies. In this paper, we present a simple method for training a unified detector on multiple large-scale datasets. We use dataset-specific training protocols and losses, but share a common detection architecture with dataset-specific outputs. We show how to automatically integrate these dataset-specific outputs into a common semantic taxonomy. In contrast to prior work, our approach does not require manual taxonomy reconciliation. Our multi-dataset detector performs as well as dataset-specific models on each training domain, but generalizes much better to new unseen domains. Entries based on the presented methodology ranked first in the object detection and instance segmentation tracks of the ECCV 2020 Robust Vision Challenge.

Features at a glance

  • We trained a unified object detector on 4 large-scale detection datasets: COCO, Objects365, OpenImages, and Mapillary, with state-of-the-art performance on all of them.

  • The model predicts class labels in a learned unified label space.

  • The model can be directly used to test on novel datasets outside the training datasets.

  • In this repo, we also provide state-of-the-art baselines for Objects365 and OpenImages.

Main results

COCO test-challenge OpenImages public test Mapillary test Objects365 val
52.9 60.6 25.3 33.7

Results are obtained using a Cascade-RCNN with ResNeSt200 trained in an 8x schedule.

  • Unified model vs. ensemble of dataset-specific models with known test domains.
COCO Objects365 OpenImages mean.
Unified 45.4 24.4 66.0 45.3
Dataset-specific models 42.5 24.9 65.7 44.4

Results are obtained using a Cascade-RCNN with Res50 trained in an 8x schedule.

  • Zero-shot cross dataset evaluation
VOC VIPER CityScapes ScanNet WildDash CrowdHuman KITTI mean
Unified 82.9 21.3 52.6 29.8 34.7 70.7 39.9 47.3
Oracle models 80.3 31.8 54.6 44.7 - 80.0 - -

Results are obtained using a Cascade-RCNN with Res50 trained in an 8x schedule.

More models can be found in our MODEL ZOO.

Installation

Our project is developed on detectron2. Please follow the official detectron2 installation. All our code is under projects/UniDet/. In theory, you should be able to copy-paste projects/UniDet/ to the latest detectron2 release or your own detectron2 repo to run our project. There might be API changes in future detectron2 releases that make it incompatible.

Demo

We use the same inference API as detectorn2. To run inference on an image folder using our pretrained model, run

python projects/UniDet/demo/demo.py --config-file projects/UniDet/configs/Unified_learned_OCIM_R50_6x+2x.yaml --input images/*.jpg --opts MODEL.WEIGHTS models/Unified_learned_OCIM_R50_6x+2x.pth

If setup correctly, the output should look like:

*The sample image is from WildDash dataset.

Note that the model predicts all labels in its label hierarchy tree (for example, both vehicle and car for a car), following the protocol in OpenImages.

Benchmark evaluation and training

After installation, follow the instructions in DATASETS.md to setup the (many) datasets. Then check REPRODUCE.md to reproduce the results in the paper.

License

All our code under projects/Unidet/ is under Apache 2.0 license. The code from detectron2 follows the original Apache 2.0 license.

Citation

If you find this project useful for your research, please use the following BibTeX entry.

@inproceedings{zhou2021simple,
  title={Simple multi-dataset detection},
  author={Zhou, Xingyi and Koltun, Vladlen and Kr{\"a}henb{\"u}hl, Philipp},
  booktitle={arXiv preprint arXiv:2102.13086},
  year={2021}
}
Comments
  • result type Float can't be cast to the desired output type Long

    result type Float can't be cast to the desired output type Long

    when i use 1 GPU(v100) "python projects/UniDet/train_net.py --config-file projects/UniDet/configs/Partitioned_COI_R50_2x.yaml --num-gpus 1",batch=16, there is no problem.

    When I use two GPUs( 2x v100), an error occurred

    python projects/UniDet/train_net.py --config-file projects/UniDet/configs/Partitioned_COI_R50_2x.yaml --num-gpus 1",batch=32

    image

    How can I solve this problem? Thank you!

    opened by ahong007007 2
  • Could you provide the files in the label_space folder

    Could you provide the files in the label_space folder

    Hi Xingyi,

    Thanks for you wonderful and easy to use work! I have managed to do some testing with the models and they performed quite well.

    However I am not able to find the files under label_spaces folder to train, e.g., datasets/label_spaces/learned_mAP+M.json Could you provide those?

    Also as a suggestion, maybe you can put the model_zoo in the main read_me. They are quite hard to find at a glance.

    Thanks

    • Links to the relevant documentation/comment:
    documentation 
    opened by Lancelot365 2
  • 6x+2x meaning

    6x+2x meaning

    📚 Documentation

    • Links to the relevant documentation/comment: Hello, Thanks for your work again. I have a question regarding the config file with '6x+2x'. The question is about the different training strategy during different stage, i.e., 6x stage and 2x stage. As I can see from the config file, The difference may be the use of EQL_LOSS; however, this loss depends the file 'datasets/oid/annotations/openimages_challenge_2019_train_v2_cat_info.json', which I do not find. Can you elaborate this a little bit? Many thanks. @xingyizhou
    documentation 
    opened by LigZhong 1
  • can't download preprocessed annotations

    can't download preprocessed annotations

    📚 Documentation

    The preprocessed annotations link is invalid, could you please reupload them? https://drive.google.com/drive/folders/1dDLiQfjEE0PqRlb7gtja-ermW2HJK5Tz?usp=sharing

    documentation 
    opened by biscuit279 0
  • question on the model settings in Tab. 5

    question on the model settings in Tab. 5

    Hi Xingyi, thanks for your wonderful work! I have a question regarding the model setting, in Tab. 5, for the naive merge, how is the merge conducted? and for the retrained, in my understanding, the box labels of multiple datasets are converted to the unified space and used for training a unified model, but still, the objects in one dataset may not be labeled in another, so we could still face such background confusion in supervision? is my understanding correct?

    Thanks in advance!

    opened by twangnh 1
  • Question about RPN

    Question about RPN

    Hello, I am very interested in your work, but I have a question to ask you. In the RPN stage, a proposal may be a positive sample in dataset A but a negative sample in dataset B. Will this produce ambiguity? Thanks!

    documentation 
    opened by hantaotao 1
  • Mapillary object detection dataset

    Mapillary object detection dataset

    Thank you for that great work. I would like to know which dataset of mapillary datasets has you used to train your model. I have check the website and I am not sure which one contains the object detection bounding boxes.

    Could you please provide a link to download the dataset.

    documentation 
    opened by Moaaz-Abdelrahman 0
  • Why some labels are duplicated in the unified detector?

    Why some labels are duplicated in the unified detector?

    For example, nightstand appears twice in the labels file learned_mAP.csv:

    line255: _nightstand_,,,nightstand,
    line693: Nightstand__,/m/02z51p,Nightstand,,
    

    But some labels from different datasets are normalized to one label. Why? Is it due to the When there are different label granularities, we keep them all in our label-space, and expect to predict all of them in the paper?

    documentation 
    opened by youyuge34 1
  • import error 'FastRCNNOutputs' from 'detectron2.modeling.roi_heads.fast_rcnn'

    import error 'FastRCNNOutputs' from 'detectron2.modeling.roi_heads.fast_rcnn'

    $ python projects/UniDet/demo/demo.py --config-file projects/UniDet/configs/Unified_learned_OCI_R50_6x.yaml --input images/34501842524_3c858b3080_k.jpg --opts MODEL.WEIGHTS models/Unified_learned_OCI_R50_6x.pth
    Traceback (most recent call last):
      File "projects/UniDet/demo/demo.py", line 18, in <module>
        from unidet.config import add_unidet_config
      File "projects/UniDet/unidet/__init__.py", line 17, in <module>
        from .modeling.roi_heads.custom_roi_heads import CustomROIHeads, CustomCascadeROIHeads
      File "projects/UniDet/unidet/modeling/roi_heads/custom_roi_heads.py", line 22, in <module>
        from .custom_fast_rcnn import CustomFastRCNNOutputLayers
      File "projects/UniDet/unidet/modeling/roi_heads/custom_fast_rcnn.py", line 16, in <module>
        from detectron2.modeling.roi_heads.fast_rcnn import FastRCNNOutputLayers, FastRCNNOutputs
    ImportError: cannot import name 'FastRCNNOutputs' from 'detectron2.modeling.roi_heads.fast_rcnn' (/ProjectRoot/pyprojects/venv/test2/lib/python3.7/site-packages/detectron2/modeling/roi_heads/fast_rcnn.py)
    

    I install detectron2 v0.6 built from https://dl.fbaipublicfiles.com/detectron2/wheels/cu101/torch1.8/index.html . The reason is detectron2 change its codebase, while ours is older one. So i follow the https://issueexplorer.com/issue/facebookresearch/unbiased-teacher/44 to fix the bug perfectly. I hope this can help someone who faces it.

    opened by youyuge34 2
Owner
Xingyi Zhou
CS Ph.D. student at UT Austin.
Xingyi Zhou
An easy way to build PyTorch datasets. Modularly build datasets and automatically cache processed results

EasyDatas An easy way to build PyTorch datasets. Modularly build datasets and automatically cache processed results Installation pip install git+https

Ximing Yang 4 Dec 14, 2021
Label Mask for Multi-label Classification

LM-MLC 一种基于完型填空的多标签分类算法 1 前言 本文主要介绍本人在全球人工智能技术创新大赛【赛道一】设计的一种基于完型填空(模板)的多标签分类算法:LM-MLC,该算法拟合能力很强能感知标签关联性,在多个数据集上测试表明该算法与主流算法无显著性差异,在该比赛数据集上的dev效果很好,但是由

null 52 Nov 20, 2022
Official implementation of "Open-set Label Noise Can Improve Robustness Against Inherent Label Noise" (NeurIPS 2021)

Open-set Label Noise Can Improve Robustness Against Inherent Label Noise NeurIPS 2021: This repository is the official implementation of ODNL. Require

Hongxin Wei 12 Dec 7, 2022
A PyTorch implementation of ICLR 2022 Oral paper PiCO: Contrastive Label Disambiguation for Partial Label Learning

PiCO: Contrastive Label Disambiguation for Partial Label Learning This is a PyTorch implementation of ICLR 2022 Oral paper PiCO; also see our Project

王皓波 83 May 11, 2022
[CVPR 2022] Back To Reality: Weak-supervised 3D Object Detection with Shape-guided Label Enhancement

Back To Reality: Weak-supervised 3D Object Detection with Shape-guided Label Enhancement Announcement ?? We have not tested the code yet. We will fini

Xiuwei Xu 7 Oct 30, 2022
implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks

YOLOR implementation of paper - You Only Learn One Representation: Unified Network for Multiple Tasks To reproduce the results in the paper, please us

Kin-Yiu, Wong 1.8k Jan 4, 2023
Code of U2Fusion: a unified unsupervised image fusion network for multiple image fusion tasks, including multi-modal, multi-exposure and multi-focus image fusion.

U2Fusion Code of U2Fusion: a unified unsupervised image fusion network for multiple image fusion tasks, including multi-modal (VIS-IR, medical), multi

Han Xu 129 Dec 11, 2022
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

XCL 191 Dec 31, 2022
Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Space robot - (Course Project) Using the space robot to capture the target satellite that is disabled and spinning, then stabilize and fix it up

Mingrui Yu 3 Jan 7, 2022
Hybrid CenterNet - Hybrid-supervised object detection / Weakly semi-supervised object detection

Hybrid-Supervised Object Detection System Object detection system trained by hybrid-supervision/weakly semi-supervision (HSOD/WSSOD): This project is

null 5 Dec 10, 2022
Yolo object detection - Yolo object detection with python

How to run download required files make build_image make download Docker versio

null 3 Jan 26, 2022
This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the time series forecasting research space.

TSForecasting This repository contains the implementations related to the experiments of a set of publicly available datasets that are used in the tim

Rakshitha Godahewa 80 Dec 30, 2022
This is the repository for CVPR2021 Dynamic Metric Learning: Towards a Scalable Metric Space to Accommodate Multiple Semantic Scales

Intro This is the repository for CVPR2021 Dynamic Metric Learning: Towards a Scalable Metric Space to Accommodate Multiple Semantic Scales Vehicle Sam

null 39 Jul 21, 2022
A general and strong 3D object detection codebase that supports more methods, datasets and tools (debugging, recording and analysis).

ALLINONE-Det ALLINONE-Det is a general and strong 3D object detection codebase built on OpenPCDet, which supports more methods, datasets and tools (de

Michael.CV 5 Nov 3, 2022
Code for Multiple Instance Active Learning for Object Detection, CVPR 2021

Language: 简体中文 | English Introduction This is the code for Multiple Instance Active Learning for Object Detection, CVPR 2021. Installation A Linux pla

Tianning Yuan 269 Dec 21, 2022
Code for Multiple Instance Active Learning for Object Detection, CVPR 2021

MI-AOD Language: 简体中文 | English Introduction This is the code for Multiple Instance Active Learning for Object Detection (The PDF is not available tem

Tianning Yuan 269 Dec 21, 2022
Multiple custom object count and detection using YOLOv3-Tiny method

Electronic-Component-YOLOv3 Introduce This project created to detect, count, and recognize multiple custom object using YOLOv3-Tiny method. The target

Derwin Mahardika 2 Nov 14, 2022
PointCloud Annotation Tools, support to label object bound box, ground, lane and kerb

PointCloud Annotation Tools, support to label object bound box, ground, lane and kerb

halo 368 Dec 6, 2022