The All-Seeing Project

repository·main·Indexed 19 days ago

https://github.com/opengvlab/all-seeing

A framework for panoptic visual recognition and complex relation comprehension in open-world scenarios. It provides vision-language foundation models (ASM and ASMv2) and large-scale datasets (AS-1B and AS-V2). ASMv2 integrates grounding and referring capabilities for region-level tasks, open-ended Scene Graph Generation, and Relation Conversation (ReC). The project includes the Circular-based Relation Probing Evaluation (CRPE) benchmark to quantitatively evaluate object recognition and relation triplets.

Tokens
18.4K
Snippets
66
Records
95
Agent score
68%

What's inside all-seeing

  1. Overview of the All-Seeing Project V2

    main

    The All-Seeing Project V2 is a framework designed for panoptic visual recognition and general relation comprehension. It introduces three core components:

    1. All-Seeing Dataset V2 (AS-V2): A dataset of 127K high-quality Relation Conversation (ReC) samples. ReC unifies text generation, object localization, and relation comprehension.
    2. All-Seeing Model v2 (ASMv2): A Multi-modal Large Language Model (MLLM) that integrates grounding and referring capabilities, making it suitable for region-level tasks and open-ended Scene Graph Generation.
    3. Circular-based Relation Probing Evaluation (CRPE) benchmark: A benchmark for quantitatively evaluating object recognition and relation comprehension by probing the elements of relation triplets (subject, predicate, object).
  2. Overview of The All-Seeing Project

    main

    The All-Seeing Project is a research initiative focused on panoptic visual recognition and general relation comprehension in an open world. It consists of two main versions, each providing foundation models and large-scale datasets:

    All-Seeing Project (V1)

    • ASM (All-Seeing Model): A unified vision-language foundation model designed for open-world panoptic visual recognition and understanding. It supports image-text retrieval and generation with strong zero-shot capabilities.
    • AS-1B (All-Seeing 1B) Dataset: A large-scale dataset for open-world panoptic visual recognition, created using a semi-automatic data engine. Subsets include AS-100M, AS-10M, and AS-Core (a human-verified subset).

    All-Seeing Project V2

    • ASMv2 (All-Seeing Model v2): An upgraded model that integrates Relation Conversation (ReC) capabilities. It excels at grounding, referring, and scene graph generation tasks.
    • AS-V2 (All-Seeing Dataset V2): A dataset containing 127K high-quality relation conversation samples designed to unlock ReC capabilities in Multi-modal Large Language Models (MLLMs).
    • CRPE Benchmark: The Circular-based Relation Probing Evaluation benchmark, used to systematically evaluate relation comprehension across (subject, predicate, object) triplets.
  3. Capabilities of ASMv2

    main

    ASMv2 (All-Seeing Model V2) is a multimodal model capable of several advanced visual-language tasks. Its primary capabilities include:

    • Multimodal Dialogue with Grounded Relation: Engaging in dialogue that includes grounding specific visual relations.
    • Multimodal Dialogue: General visual-language reasoning across various benchmarks (e.g., VQAv2, GQA, TextVQA).
    • Multimodal Dialogue with Pointer Instructions: Performing Referring Expression Comprehension (REC) to identify specific objects based on text descriptions.
    • Region Captioning: Generating descriptive text for specific regions within an image.
    • Visual Commonsense Reasoning: Performing tasks like Question-to-Answer (Q $\rightarrow$ A), Question-Answer-to-Relation (QA $\rightarrow$ R), and Question-to-Attribute-Relation (Q $\rightarrow$ AR).
    • CRPE (Commonsense Relation Perception and Extraction): Evaluating existence, subjects, predicates, and objects in visual relations.
    • Open-ended Scene Graph Generation: Generating scene graphs (tuples of relations) from visual input.
  4. Understand the LLaVA-Bench scoring methodology

    main

    LLaVA-Bench scores are determined using a text-only GPT-4 evaluator. The evaluation process follows these steps:

    1. Reference Generation: A reference answer is generated by feeding the question and ground truth image annotations into a text-only GPT-4 instance.
    2. Comparison: The GPT-4 evaluator is provided with the reference answer first, followed by the answer generated by the candidate model.
    3. Rating: GPT-4 rates the candidate model's answer against the reference.

    Note: When evaluating commercial models like Bard or Bing-Chat, images are uploaded at their original resolution. Be aware that some models may have specific behaviors, such as refusing to answer questions about humans or blurring faces.

  5. Understand the Relation Conversation (ReC) data format in AS-V2

    main

    The AS-V2 dataset uses a Relation Conversation (ReC) formulation where objects and predicates are explicitly marked within text to facilitate scene graph parsing.

    Tagging Convention

    • Objects: Marked using <ref></ref> tags. Each marked object is followed by its corresponding bounding box.
    • Predicates: Marked using <pred></pred> tags. Each marked predicate is followed by two bounding boxes representing the subject and the object of that predicate.

    Bounding Box Format

    All bounding boxes are normalized to integer values in the range $[0, 1000)$ and follow this structure:

    <box>[[x1, y1, x2, y2], ..., [x1, yn, x2, yn]]</box>

    Where [x1, y1, x2, y2] denotes the $i$-th bounding box linked to the object or predicate.

    For detailed parsing logic, refer to the project's paper or the scripts_asmv2/visualize_rec.py script.

    <ref>object_name</ref><box>[[x1, y1, x2, y2]]</box>
    <pred>predicate_name</pred><box>[[subject_x1, subject_y1, subject_x2, subject_y2], [object_x1, object_y1, object_x2, object_y2]]</box>
  6. Evaluate models using the CRPE benchmark

    main

    The Circular-based Relation Probing Evaluation (CRPE) benchmark evaluates object recognition and relation comprehension through single-choice questions. It is divided into four specific splits to probe the components of a relation triplet (subject, predicate, object):

    • Existence: Evaluates basic object recognition ability.
    • Subject: Probes the ability to identify the subject in a relation.
    • Predicate: Probes the ability to identify the predicate in a relation.
    • Object: Probes the ability to identify the object in a relation.

    The benchmark also includes abnormal data containing rare or unrealistic relation triplets to evaluate a model's dependency on language priors (i.e., whether it relies on common sense rather than actual visual evidence).

  7. Evaluate on MMBench-CN

    main

    To evaluate on the MMBench-CN benchmark:

    1. Download mmbench_dev_cn_20231003.tsv and place it under ./playground/data/eval/mmbench.
    2. Run single-GPU inference using the provided script.
    3. Submit results from ./playground/data/eval/mmbench/answers_upload/mmbench_dev_cn_20231003 to the evaluation server.
    CUDA_VISIBLE_DEVICES=0 bash scripts/v1_5/eval/mmbench_cn.sh
  8. Launch the LLaVA LoRA Web UI Demo

    main

    To run the LLaVA LoRA technical preview demo, you must launch three components sequentially: a controller, a Gradio web server, and a model worker.

    Prerequisites:

    • You must use the latest LLaVA codebase.
    • You need the Vicuna v1.1 (7B) checkpoint as the --model-base.
    • The --model-base must correspond to the LoRA checkpoint being used.

    Steps:

    1. Launch the Controller: This manages the communication between workers and the UI.
    2. Launch the Gradio Web Server: This provides the user interface. Note that the model list will be empty until a worker is launched.
    3. Launch a Model Worker: This loads the actual LoRA weights and the base model. Once the worker is running, refresh the Gradio UI to see the model in the list.

    You can launch multiple workers to compare different checkpoints in the same interface by using different --port and --worker values while keeping the same --controller address.

    # 1. Launch a controller
    python -m llava.serve.controller --host 0.0.0.0 --port 10000
    
    # 2. Launch a gradio web server
    python -m llava.serve.gradio_web_server --controller http://localhost:10000 --model-list-mode reload
    
    # 3. Launch a model worker
    python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-vicuna-7b-v1.1-lcs_558k-instruct_80k_3e-lora-preview-alpha --model-base /path/to/vicuna-v1.1
  9. Prepare evaluation environment and data structure

    main
    Before running any task-specific evaluation scripts, you MUST download eval.zip and extract it to ./playground/data/eval. This directory contains the necessary custom annotations, scripts, and prediction files for LLaVA v1.5, and establishes the required directory structure for all supported datasets.
  10. Launch the LLaVA Gradio Web UI

    main

    To run the Gradio demo, you must first prepare LLaVA checkpoints locally. The architecture consists of a Controller (API Server), a Gradio Web Server (UI), and one or more Model Workers (Inference Engines).

    Follow these steps in order:

    1. Launch the Controller: This acts as the central hub.
    2. Launch the Gradio Web Server: This provides the user interface. It will initially show an empty model list.
    3. Launch Model Workers: Each worker performs inference for a specific model. Once a worker is running, refresh the Gradio UI to see the model in the list.

    You can launch multiple workers on different ports to compare different checkpoints within the same interface.

    # 1. Launch the controller
    python -m llava.serve.controller --host 0.0.0.0 --port 10000
    
    # 2. Launch the gradio web server
    python -m llava.serve.gradio_web_server --controller http://localhost:10000 --model-list-mode reload
    
    # 3. Launch a model worker (e.g., LLaVA-1.5-13B)
    python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path liuhaotian/llava-v1.5-13b