InternImage

repository·master·Indexed 25 days ago

https://github.com/opengvlab/internimage

A large-scale vision foundation model series utilizing Deformable Convolutional Networks (DCNv3) for classification, detection, and segmentation. The repository includes baselines for autonomous driving tasks such as the CVPR23 Occupancy Prediction Challenge, Online HD Map Construction, and the OpenLane-V2 Challenge. It provides various model scales, including InternImage-T, S, B, L, XL, H, and G, with optimized CUDA kernels for DCNv3 to improve inference efficiency and reduce GPU memory usage.

Tokens
31.4K
Snippets
46
Records
145
Agent score
83%

What's inside InternImage

  1. Overview of InternImage Vision Foundation Models

    master

    InternImage is a large-scale vision foundation model based on Convolutional Neural Networks (CNN). Unlike Transformer-based networks, it utilizes DCNv3 (Deformable Convolution v3) as its core operator, providing a dynamic effective receptive field and adaptive spatial aggregation suitable for downstream tasks like detection and segmentation.

    Key Capabilities:

    • Supports various downstream tasks including classification, object detection, and semantic segmentation.
    • Supports autonomous driving perception (e.g., BEVFormer series).
    • Supports low-cost training via DeepSpeed.
    • Supports TensorRT inference for classification, detection, and segmentation.
    • Provides model intermediate feature extraction via classification/extract_feature.py.
  2. Overview of OpenLane-Huawei

    master
    OpenLane-Huawei is the world's first benchmark for autonomous driving road structure perception and reasoning. It provides 3D lane centerlines, 2D traffic element (traffic lights and signs) annotations with attributes, and topological relationships between lanes and traffic elements to create a structured scene representation. The dataset is designed to support tasks involving both perception and reasoning in complex driving environments.
  3. Overview of InternImage Vision Foundation Model

    master
    InternImage is a large-scale vision foundation model that utilizes DCNv3 (Deformable Convolutional Networks) as its core operator instead of Transformers. This design provides dynamic and effective receptive fields for tasks like object detection and segmentation. It is a universal visual backbone capable of scaling up to 3 billion parameters and has achieved state-of-the-art performance on benchmarks including ImageNet (90.1% Top-1), COCO (65.5 mAP), and ADE20K.
  4. Understand OpenLane-V2 Data Hierarchy

    master

    The OpenLane-V2/ directory follows this structure:

    • train/, val/, test/: Data splits.
      • [segment_id]/: A sequence of frames.
        • image/[camera]/[timestamp].jpg: Images captured by specific cameras.
        • info/[timestamp].json: Metadata and annotations for a single frame.
    • data_dict_[xxx].json: JSON files defining the split of train/val/test for specific subsets (e.g., subset_A).
    • preprocess.py: Preprocessing script.
    • openlanev2.md5: MD5 checksums.
  5. Understand the OpenLane-V2 Score (OLS)

    master

    The OpenLane-V2 Score (OLS) is a consolidated metric used to evaluate performance across multiple aspects of the autonomous driving task. It is calculated as the average of four specific metrics:

    • $\text{DET}_{l}$: mAP on directed lane centerlines.
    • $\text{DET}_{t}$: mAP on traffic elements.
    • $\text{TOP}_{ll}$: mAP on topology among lane centerlines.
    • $\text{TOP}_{lt}$: mAP on topology between lane centerlines and traffic elements.
  6. Available ADE20K Semantic Segmentation Models

    master

    The ADE20K model zoo provides pre-trained InternImage backbones for semantic segmentation using two different architectures: UperNet and Mask2Former. Models vary by backbone size (T, S, B, L, XL, H) and input resolution.

    Key Performance Metrics:

    • mIoU (ss/ms): Semantic segmentation mIoU for single-scale and multi-scale.
    • Training Speed: Measured using A100 GPUs.
    • Memory Management: If you encounter out-of-memory issues during training, set with_cp=True to save memory.
  7. Explore related multimodal and autonomous driving projects

    master

    InternImage is part of a broader ecosystem of vision and multimodal research. Related projects include:

    Multimodal Foundation Models

    • Uni-Perceiver: A unified pre-training framework for general perception tasks, supporting zero-shot and few-shot tasks.
    • Uni-Perceiver v2: A general model for image and image-text tasks.
    • M3I-Pretraining: A single-stage pre-training paradigm based on maximizing mutual information between inputs and targets.
    • InternVL: A leading multimodal large language model (MLLM) excelling in OCR, multimodal reasoning, and dialogue.

    Autonomous Driving

    • BEVFormer: A next-generation pure vision surround perception solution based on Bird's-Eye-View (BEV).
    • BEVFormer v2: A two-stage detector fusing BEV perception and perspective view detection.
  8. Available InternImage Models for COCO

    master

    The COCO model zoo provides pre-trained weights and configurations for various object detection architectures using InternImage backbones. Models are categorized into:

    • Mask R-CNN + InternImage: Standard instance segmentation models (Backbones: T, S, B).
    • Cascade Mask R-CNN + InternImage: High-performance instance segmentation models (Backbones: L, XL).
    • DINO + InternImage: Transformer-based detection models (Backbones: T, L).
    • DINO + CB-InternImage: Large-scale models using CB-InternImage (Backbone: H).

    Each model entry includes a configuration file, a checkpoint (.pth), and training logs.

  9. Set up the OpenLane-V2 environment and devkit

    master

    Follow these steps to install the OpenLane-V2 environment and the openlanv2 devkit.

    1. Clone and Install Environment:

      git clone https://github.com/OpenDriveLab/OpenLane-V2.git
      cd OpenLane-V2
      conda create -n openlanev2 python=3.8 -y
      conda activate openlanev2
      pip install -r requirements.txt
      python setup.py develop
    2. Download Data: Download the dataset from OpenDataLab, Google Drive, or Baidu Yun and place it in the data/OpenLane-V2/ folder.

    3. Quick Start with Sample Data: Use the following commands to download and extract sample data for testing:

      cd data/OpenLane-V2
      wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1Ni-L6u1MGKJRAfUXm39PdBIxdk_ntdc6' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1Ni-L6u1MGKJRAfUXm39PdBIxdk_ntdc6" -O OpenLane-V2_sample.tar
      md5sum -c openlanev2.md5
      tar -xvf *.tar
      cd ../..
    4. Tutorial: Run the tutorial.ipynb Jupyter notebook to learn how to use the openlanv2 API for loading images, metadata, and evaluating results.

    git clone https://github.com/OpenDriveLab/OpenLane-V2.git
    cd OpenLane-V2
    conda create -n openlanev2 python=3.8 -y
    conda activate openlanev2
    pip install -r requirements.txt
    python setup.py develop