Upload 4 files
Browse files- .gitattributes +2 -0
- LICENSE +51 -0
- README.md +133 -0
- assets/logo.png +3 -0
- assets/teaser.png +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/logo.png filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/teaser.png filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
IDEA License 1.0
|
| 2 |
+
|
| 3 |
+
This License Agreement (as may be amended in accordance with this License Agreement, โLicenseโ), between you, or your employer or other entity (if you are entering into this agreement on behalf of your employer or other entity) (โLicenseeโ or โyouโ) and the International Digital Economy Academy (โIDEAโ or โweโ) applies to your use of any computer program, algorithm, source code, object code, or software that is made available by IDEA under this License (โSoftwareโ) and any specifications, manuals, documentation, and other written information provided by IDEA related to the Software (โDocumentationโ).
|
| 4 |
+
|
| 5 |
+
By downloading the Software or by using the Software, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to use the Software or Documentation (collectively, the โSoftware Productsโ), and you must immediately cease using the Software Products. If you are agreeing to be bound by the terms of this License on behalf of your employer or other entity, you represent and warrant to IDEA that you have full legal authority to bind your employer or such entity to this License. If you do not have the requisite authority, you may not accept the License or access the Software Products on behalf of your employer or other entity.
|
| 6 |
+
|
| 7 |
+
1. LICENSE GRANT
|
| 8 |
+
|
| 9 |
+
a. You are granted a non-exclusive, worldwide, transferable, sublicensable, irrevocable, royalty free and limited license under IDEAโs copyright interests to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Software solely for your non-commercial research purposes.
|
| 10 |
+
|
| 11 |
+
b. The grant of rights expressly set forth in this Section 1 (License Grant) are the complete grant of rights to you in the Software Products, and no other licenses are granted, whether by waiver, estoppel, implication, equity or otherwise. IDEA and its licensors reserve all rights not expressly granted by this License.
|
| 12 |
+
|
| 13 |
+
c. If you intend to use the Software Products for any commercial purposes, you must request a license from IDEA, which IDEA may grant to you in its sole discretion.
|
| 14 |
+
|
| 15 |
+
2. REDISTRIBUTION AND USE
|
| 16 |
+
|
| 17 |
+
a. If you distribute or make the Software Products, or any derivative works thereof, available to a third party, you shall provide a copy of this Agreement to such third party.
|
| 18 |
+
|
| 19 |
+
b. You must retain in all copies of the Software Products that you distribute the following attribution notice: "T is licensed under the IDEA License 1.0, Copyright (c) IDEA. All Rights Reserved."
|
| 20 |
+
|
| 21 |
+
d. Your use of the Software Products must comply with applicable laws and regulations (including trade compliance laws and regulations).
|
| 22 |
+
|
| 23 |
+
e. You will not, and will not permit, assist or cause any third party to use, modify, copy, reproduce, create derivative works of, or distribute the Software Products (or any derivative works thereof, works incorporating the Software Products, or any data produced by the Software), in whole or in part, for in any manner that infringes, misappropriates, or otherwise violates any third-party rights.
|
| 24 |
+
|
| 25 |
+
3. DISCLAIMER OF WARRANTY
|
| 26 |
+
|
| 27 |
+
UNLESS REQUIRED BY APPLICABLE LAW, THE SOFTWARE PRODUCTS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE SOFTWARE PRODUCTS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE SOFTWARE PRODUCTS AND ANY OUTPUT AND RESULTS.
|
| 28 |
+
|
| 29 |
+
4. LIMITATION OF LIABILITY
|
| 30 |
+
|
| 31 |
+
IN NO EVENT WILL IDEA OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF IDEA OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
| 32 |
+
|
| 33 |
+
5. INDEMNIFICATION
|
| 34 |
+
|
| 35 |
+
You will indemnify, defend and hold harmless IDEA and our subsidiaries and affiliates, and each of our respective shareholders, directors, officers, employees, agents, successors, and assigns (collectively, the โIDEA Partiesโ) from and against any losses, liabilities, damages, fines, penalties, and expenses (including reasonable attorneysโ fees) incurred by any IDEA Party in connection with any claim, demand, allegation, lawsuit, proceeding, or investigation (collectively, โClaimsโ) arising out of or related to: (a) your access to or use of the Software Products (as well as any results or data generated from such access or use); (b) your violation of this License; or (c) your violation, misappropriation or infringement of any rights of another (including intellectual property or other proprietary rights and privacy rights). You will promptly notify the IDEA Parties of any such Claims, and cooperate with IDEA Parties in defending such Claims. You will also grant the IDEA Parties sole control of the defense or settlement, at IDEAโs sole option, of any Claims. This indemnity is in addition to, and not in lieu of, any other indemnities or remedies set forth in a written agreement between you and IDEA or the other IDEA Parties.
|
| 36 |
+
|
| 37 |
+
6. TERMINATION; SURVIVAL
|
| 38 |
+
|
| 39 |
+
a. This License will automatically terminate upon any breach by you of the terms of this License.
|
| 40 |
+
|
| 41 |
+
b. If you institute litigation or other proceedings against IDEA or any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Software Products, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted.
|
| 42 |
+
|
| 43 |
+
c. The following sections survive termination of this License: 2 (Redistribution and use), 3 (Disclaimers of Warranty), 4 (Limitation of Liability), 5 (Indemnification), 6 (Termination; Survival), 7 (Trademarks) and 8 (Applicable Law; Dispute Resolution).
|
| 44 |
+
|
| 45 |
+
7. TRADEMARKS
|
| 46 |
+
|
| 47 |
+
Licensee has not been granted any trademark license as part of this License and may not use any name or mark associated with IDEA without the prior written permission of IDEA, except to the extent necessary to make the reference required by the attribution notice of this Agreement.
|
| 48 |
+
|
| 49 |
+
8. APPLICABLE LAW; DISPUTE RESOLUTION
|
| 50 |
+
|
| 51 |
+
This License will be governed and construed under the laws of the Peopleโs Republic of China without regard to conflicts of law provisions. The parties expressly agree that the United Nations Convention on Contracts for the International Sale of Goods will not apply. Any suit or proceeding arising out of or relating to this License will be brought in the courts, as applicable, in Shenzhen, Guangdong, and each party irrevocably submits to the jurisdiction and venue of such courts.
|
README.md
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- vision
|
| 7 |
+
- object-detection
|
| 8 |
+
- multimodal
|
| 9 |
+
- ocr
|
| 10 |
+
- keypoint-detection
|
| 11 |
+
- visual-prompting
|
| 12 |
+
pipeline_tag: image-text-to-text
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
<div align=center>
|
| 16 |
+
<img src="assets/logo.png" width=600 >
|
| 17 |
+
</div>
|
| 18 |
+
|
| 19 |
+
<h1 align="center">Detect Anything via Next Point Prediction</h1>
|
| 20 |
+
|
| 21 |
+
<div align=center>
|
| 22 |
+
|
| 23 |
+
<p align="center">
|
| 24 |
+
<a href="https://rex-omni.github.io/">
|
| 25 |
+
<img
|
| 26 |
+
src="https://img.shields.io/badge/RexOmni-Website-BADFDB?style=flat-square&logo=deno&logoColor=violet&color=BADFDB"
|
| 27 |
+
alt="RexThinker Website"
|
| 28 |
+
/>
|
| 29 |
+
</a>
|
| 30 |
+
<a href="https://arxiv.org/abs/2506.04034">
|
| 31 |
+
<img
|
| 32 |
+
src="https://img.shields.io/badge/RexOmni-Paper-Red%25red?logo=arxiv&logoColor=red&color=yellow"
|
| 33 |
+
alt="RexThinker Paper on arXiv"
|
| 34 |
+
/>
|
| 35 |
+
</a>
|
| 36 |
+
<a href="https://huggingface.co/IDEA-Research/Rex-Omni">
|
| 37 |
+
<img
|
| 38 |
+
src="https://img.shields.io/badge/RexOmni-Weight-orange?logo=huggingface&logoColor=yellow"
|
| 39 |
+
alt="RexThinker weight on Hugging Face"
|
| 40 |
+
/>
|
| 41 |
+
</a>
|
| 42 |
+
<a href="https://huggingface.co/spaces/Mountchicken/Rex-Omni">
|
| 43 |
+
<img
|
| 44 |
+
src="https://img.shields.io/badge/RexOmni-Demo-orange?logo=huggingface&logoColor=yellow"
|
| 45 |
+
alt="RexThinker Demo on Hugging Face"
|
| 46 |
+
/>
|
| 47 |
+
</a>
|
| 48 |
+
|
| 49 |
+
</p>
|
| 50 |
+
|
| 51 |
+
</div>
|
| 52 |
+
|
| 53 |
+
> Rex-Omni is a 3B-parameter Multimodal Large Language Model (MLLM) that redefines object detection and a wide range of other visual perception tasks as a simple next-token prediction problem.
|
| 54 |
+
|
| 55 |
+
<p align="center"><img src="assets/teaser.png" width="95%"></p>
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
## ๐ Quick Start
|
| 60 |
+
|
| 61 |
+
### Installation
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
conda create -n rexomni -m python=3.10
|
| 65 |
+
pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124
|
| 66 |
+
git clone https://github.com/IDEA-Research/Rex-Omni.git
|
| 67 |
+
cd Rex-Omni
|
| 68 |
+
pip install -v -e .
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
## 2. Quick Start: Using Rex-Omni for Detection
|
| 72 |
+
|
| 73 |
+
```python
|
| 74 |
+
from PIL import Image
|
| 75 |
+
from rex_omni import RexOmniWrapper, RexOmniVisualize
|
| 76 |
+
|
| 77 |
+
# Initialize model
|
| 78 |
+
model = RexOmniWrapper(
|
| 79 |
+
model_path="IDEA-Research/Rex-Omni",
|
| 80 |
+
backend="transformers" # or "vllm"
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
# Load image
|
| 84 |
+
image = Image.open("your_image.jpg")
|
| 85 |
+
|
| 86 |
+
# Object Detection
|
| 87 |
+
results = model.inference(
|
| 88 |
+
images=image,
|
| 89 |
+
task="detection",
|
| 90 |
+
categories=["person", "car", "dog"]
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
result = results[0]
|
| 94 |
+
|
| 95 |
+
# 4) Visualize
|
| 96 |
+
vis = RexOmniVisualize(
|
| 97 |
+
image=image,
|
| 98 |
+
predictions=result["extracted_predictions"],
|
| 99 |
+
font_size=20,
|
| 100 |
+
draw_width=5,
|
| 101 |
+
show_labels=True,
|
| 102 |
+
)
|
| 103 |
+
vis.save("visualize.jpg")
|
| 104 |
+
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
## 3. Tutorials
|
| 108 |
+
|
| 109 |
+
We provide a series of tutorials to help you get started with Rex-Omni.
|
| 110 |
+
- [Detection Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/detection_example/_full_notebook.ipynb)
|
| 111 |
+
- [Pointing Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/pointing_example/_full_tutorial.ipynb)
|
| 112 |
+
- [OCR Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/ocr_example/_full_tutorial.ipynb)
|
| 113 |
+
- [Keypointing Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/keypointing_example/_full_tutorial.ipynb)
|
| 114 |
+
- [Visual Prompting Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/visual_prompting_example/_full_tutorial.ipynb)
|
| 115 |
+
- [Batch Inference Example](https://github.com/IDEA-Research/Rex-Omni/blob/master/tutorials/other_example/batch_inference.py)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
## ๐ License
|
| 119 |
+
|
| 120 |
+
Rex-Omni is licensed under the [IDEA License 1.0](LICENSE), Copyright (c) IDEA. All Rights Reserved.
|
| 121 |
+
|
| 122 |
+
## ๐ Links
|
| 123 |
+
|
| 124 |
+
- ๐ [Homepage](https://rex-omni.github.io/)
|
| 125 |
+
- ๐ฎ [Demo](https://huggingface.co/spaces/Mountchicken/Rex-Omni)
|
| 126 |
+
|
| 127 |
+
## ๐ง Contact
|
| 128 |
+
|
| 129 |
+
For questions and feedback, please contact us at:
|
| 130 |
+
- Email: jiangqing@idea.edu.cn
|
| 131 |
+
- GitHub Issues: [IDEA-Research/Rex-Omni](https://github.com/IDEA-Research/Rex-Omni/issues)
|
| 132 |
+
|
| 133 |
+
|
assets/logo.png
ADDED
|
Git LFS Details
|
assets/teaser.png
ADDED
|
Git LFS Details
|