Safetensors
custom_code
gheinrich commited on
Commit
2745cf8
·
verified ·
1 Parent(s): 23324c5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +227 -5
README.md CHANGED
@@ -1,5 +1,227 @@
1
- ---
2
- license: other
3
- license_name: nvidia-open-model-license
4
- license_link: https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: nvidia-open-model-license
4
+ license_link: https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf
5
+ ---
6
+
7
+ # Model Overview
8
+
9
+ ## Description
10
+
11
+ This model performs visual feature extraction.
12
+ For instance, RADIO generates image embeddings that can be used by a downstream model to classify images.
13
+
14
+ C-RADIOv2 models are available in multiple sizes:
15
+ * Base (90M parameters).
16
+ * Large (320M parameters).
17
+ * Huge (653M parameters).
18
+ * Gigantic (1.8B parameters).
19
+
20
+ C-RADIOv2 was trained for 1M steps (400k more steps than v1), using inverse frequency sampling for data balancing, and [PHI Standardization](https://arxiv.org/abs/2410.01680) for teacher distribution balancing.
21
+
22
+ This model is ready for commercial/non-commercial use.
23
+
24
+ ### License/Terms of Use
25
+
26
+ GOVERNING TERMS: Use of this model is governed by the [NVIDIA Open Model License Agreement](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf).
27
+
28
+ ## Deployment Geography
29
+
30
+ Global.
31
+
32
+ ## Use Case
33
+
34
+ The embeddings generated by this model are expected to be used by a downstream application.
35
+ For example:
36
+
37
+ * Image-level understanding (image classification, curation, etc.).
38
+ * Dense processing (semantic segmentation, depth estimation, etc.).
39
+ * Integration into a Vision-Language Model.
40
+
41
+ ## Release Date
42
+
43
+ Huggingface: 03/26/2025 via [RADIO Collection of Models](https://huggingface.co/collections/nvidia/radio-669f77f1dd6b153f007dd1c6).
44
+
45
+ ## References
46
+
47
+ * \[CVPR 2025\] [**RADIOv2.5: Improved Baselines for Agglomerative Vision Foundation Models**](https://arxiv.org/abs/2412.07679)
48
+ * \[CVPR 2024\] [**AM-RADIO: Agglomerative Vision Foundation Model - Reduce All Domains Into One**](https://arxiv.org/abs/2312.06709)
49
+
50
+ ## Model Architecture
51
+
52
+ **Architecture Type:** Neural Network <br>
53
+ **Network Architecture:** Vision Transformer <br>
54
+
55
+ ## Input
56
+
57
+ **Input Type(s):** Image <br>
58
+ **Input Format(s):** Red, Green, Blue (RGB) <br>
59
+ **Input Parameters:** Two Dimensional (2D) <br>
60
+ **Other Properties Related to Input:** Image resolutions up to 2048x2028 in increments of 16 pixels <br>
61
+
62
+ ## Output
63
+
64
+ **Output Type(s):** Embeddings <br>
65
+ **Output Format:** Tensor <br>
66
+ **Output Parameters:** 2D <br>
67
+ **Other Properties Related to Output:** Downstream model required to leverage image features <br>
68
+
69
+ ## Usage:
70
+
71
+ RADIO will return a tuple with two tensors.
72
+ The `summary` is similar to the `cls_token` in ViT and is meant to represent the general concept of the entire image.
73
+ It has shape `(B,C)` with `B` being the batch dimension, and `C` being some number of channels.
74
+ The `spatial_features` represent more localized content which should be suitable for dense tasks such as semantic segmentation, or for integration into an LLM.
75
+
76
+ ```python
77
+ import torch
78
+ from PIL import Image
79
+ from transformers import AutoModel, CLIPImageProcessor
80
+
81
+ hf_repo = "nvidia/C-RADIOv2-H"
82
+
83
+ image_processor = CLIPImageProcessor.from_pretrained(hf_repo)
84
+ model = AutoModel.from_pretrained(hf_repo, trust_remote_code=True)
85
+ model.eval().cuda()
86
+
87
+ image = Image.open('./assets/radio.png').convert('RGB')
88
+ pixel_values = image_processor(images=image, return_tensors='pt', do_resize=True).pixel_values
89
+ pixel_values = pixel_values.cuda()
90
+
91
+ summary, features = model(pixel_values)
92
+ ```
93
+
94
+ Spatial features have shape `(B,T,D)` with `T` being the flattened spatial tokens, and `D` being the channels for spatial features. Note that `C!=D` in general.
95
+ Converting to a spatial tensor format can be done using the downsampling size of the model, combined with the input tensor shape. For RADIO, the patch size is 16.
96
+
97
+ ```Python
98
+ from einops import rearrange
99
+ spatial_features = rearrange(spatial_features, 'b (h w) d -> b d h w', h=x.shape[-2] // patch_size, w=x.shape[-1] // patch_size)
100
+ ```
101
+
102
+ The resulting tensor will have shape `(B,D,H,W)`, as is typically seen with computer vision models.
103
+
104
+ ## Software Integration
105
+
106
+ **Runtime Engine(s):**
107
+ * TAO- 24.10 <br>
108
+
109
+ **Supported Hardware Microarchitecture Compatibility:** <br>
110
+ * NVIDIA Ampere <br>
111
+ * NVIDIA Blackwell <br>
112
+ * NVIDIA Jetson <br>
113
+ * NVIDIA Hopper <br>
114
+ * NVIDIA Lovelace <br>
115
+ * NVIDIA Pascal <br>
116
+ * NVIDIA Turing <br>
117
+ * NVIDIA Volta <br>
118
+
119
+ **[Preferred/Supported] Operating System(s):** <br>
120
+ * Linux
121
+ * Linux 4 Tegra
122
+ * QNX
123
+ * Windows
124
+
125
+ ## Model Version(s)
126
+
127
+ * C-RADIOv2-B (90M parameters).
128
+ * C-RADIOv2-L (320M parameters).
129
+ * C-RADIOv2-H (653M parameters).
130
+ * C-RADIOv2-G (1.8B parameters).
131
+
132
+ **Links:**
133
+
134
+ * https://huggingface.co/nvidia/C-RADIOv2-B
135
+ * https://huggingface.co/nvidia/C-RADIOv2-L
136
+ * https://huggingface.co/nvidia/C-RADIOv2-H
137
+ * https://huggingface.co/nvidia/C-RADIOv2-G
138
+
139
+ # Training and Evaluation Datasets
140
+
141
+ ## Training Dataset
142
+
143
+ NV-CC-Img-Text-Dataset <br>
144
+
145
+ ### Data Collection Method by dataset
146
+
147
+ * Automated <br>
148
+
149
+ ### Labeling Method by dataset
150
+
151
+ * Not Applicable (no labels are needed)
152
+
153
+ ### Properties
154
+
155
+ * 700 Million Images <br>
156
+
157
+ ## Evaluation Dataset
158
+
159
+ **Link:** [ImageNet](https://www.image-net.org/) <br>
160
+
161
+ ### Data Collection Method by dataset
162
+
163
+ * Automated <br>
164
+
165
+ ### Labeling Method by dataset
166
+
167
+ * Human <br>
168
+
169
+ **Properties:** This dataset spans 1000 object classes and contains 1,281,167 training images, 50,000 validation images and 100,000 test images.<br>
170
+
171
+ ## Inference
172
+
173
+ **Engine:** PyTorch <br>
174
+ **Test Hardware:** A100 <br>
175
+
176
+ ## Ethical Considerations
177
+
178
+ NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.
179
+
180
+ For more detailed information on ethical considerations for this model, please see the Model Card++ Explainability, Bias, Safety & Security, and Privacy Subcards below.
181
+
182
+ Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).
183
+
184
+ ### Bias
185
+
186
+ Field | Response
187
+ :---------------------------------------------------------------------------------------------------|:---------------
188
+ Participation considerations from adversely impacted groups [protected classes](https://www.senate.ca.gov/content/protected-classes) in model design and testing: | None
189
+ Measures taken to mitigate against unwanted bias: | None
190
+
191
+
192
+ ### Explainability
193
+
194
+ Field | Response
195
+ :------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------
196
+ Intended Application & Domain: | Visual Feature Extraction
197
+ Model Type: | Vision Transformer
198
+ Intended Users: | Developers of downstream vision applications
199
+ Output: | Image embeddings
200
+ Describe how the model works: | The model takes an image as input, processes the image through multiple transformer blocks, and outputs summary and patch embeddings.
201
+ Name the adversely impacted groups this has been tested to deliver comparable outcomes regardless of: | Not Applicable
202
+ Technical Limitations: | This model generates image embeddings that can be used by a downstream model to, for example, classify images. The downstream model must be trained to leverage the visual embeddings.
203
+ Verified to have met prescribed NVIDIA quality standards: | Yes
204
+ Performance Metrics: | Image classification accuracy, semantic segmentation mean-over-intersection.
205
+ Potential Known Risks: | This model is only tested on input resolutions ranging from 256 to 2048, in increments of 16 pixels. Additionally, the generated embeddings might fail to disambiguate differences that appear evident to humans (e.g. two images showing different breeds of dogs might in fact produce very similar embeddings). Domain-specific evaluation is required for the target application.
206
+ Licensing: | [NVIDIA Open Model License](https://developer.download.nvidia.com/licenses/nvidia-open-model-license-agreement-june-2024.pdf)
207
+
208
+
209
+ ### Privacy
210
+
211
+ Field | Response
212
+ :----------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------
213
+ Generatable or reverse engineerable personal data? | None
214
+ Personal data used to create this model? | None
215
+ How often is dataset reviewed? | Before Every Release
216
+ Is there provenance for all datasets used in training? | Yes
217
+ Does data labeling (annotation, metadata) comply with privacy laws? | Yes
218
+ Is data compliant with data subject requests for data correction or removal, if such a request was made? | Yes
219
+
220
+ ### Safety
221
+
222
+ Field | Response
223
+ :---------------------------------------------------|:----------------------------------
224
+ Model Application(s): | Generation of visual embeddings
225
+ Describe the life critical impact (if present). | Not Applicable
226
+ Use Case Restrictions: | Abide by NVIDIA Open Model License Agreement
227
+ Model and dataset restrictions: | The Principle of least privilege (PoLP) is applied limiting access for dataset generation and model development. Restrictions enforce dataset access during training, and dataset license constraints adhered to.