Move README section
Browse files
README.md
CHANGED
|
@@ -31,10 +31,6 @@ The weights shared here correspond to our best-performing model, COLIPRI-CRM.
|
|
| 31 |
COLIPRI is shared for research purposes only.
|
| 32 |
It is **not meant to be used for clinical practice**.
|
| 33 |
|
| 34 |
-
<!-- ### Downstream use -->
|
| 35 |
-
|
| 36 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 37 |
-
|
| 38 |
The encoders be plugged to other models, or used independently or jointly for many downstream tasks, such as:
|
| 39 |
|
| 40 |
- Image classification with text prompts
|
|
@@ -51,24 +47,15 @@ The encoders be plugged to other models, or used independently or jointly for ma
|
|
| 51 |
|
| 52 |
Fine-tuning COLIPRI is typically not necessary to obtain good performance in downstream tasks.
|
| 53 |
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 57 |
-
|
| 58 |
-
## Biases, risks, and limitations
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
COLIPRI was trained with data from Turkey and the USA only, therefore it might be biased towards population in the training data.
|
| 63 |
-
Underlying biases of the training datasets may not be well characterized.
|
| 64 |
-
|
| 65 |
-
## Installation
|
| 66 |
|
| 67 |
```shell
|
| 68 |
pip install git+https://huggingface.co/microsoft/colipri.git
|
| 69 |
```
|
| 70 |
|
| 71 |
-
|
| 72 |
|
| 73 |
Below we share some usage snippets to get started with COLIPRI.
|
| 74 |
A more complete [Jupyter notebook](./COLIPRI_demo.ipynb) is also available.
|
|
@@ -96,7 +83,7 @@ Now, let's instantiate the model and processor.
|
|
| 96 |
>>> processor = get_processor()
|
| 97 |
```
|
| 98 |
|
| 99 |
-
|
| 100 |
|
| 101 |
```python
|
| 102 |
>>> from colipri import ZeroShotImageClassificationPipeline
|
|
@@ -108,7 +95,7 @@ Now, let's instantiate the model and processor.
|
|
| 108 |
]
|
| 109 |
```
|
| 110 |
|
| 111 |
-
|
| 112 |
|
| 113 |
```python
|
| 114 |
>>> import torch
|
|
@@ -128,6 +115,13 @@ torch.Size([1, 768, 24, 24, 24])
|
|
| 128 |
torch.Size([1, 768])
|
| 129 |
```
|
| 130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
## Environmental impact
|
| 132 |
|
| 133 |
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
|
@@ -149,7 +143,7 @@ COLIPRI was trained on [Azure Machine Learning](https://azure.microsoft.com/en-u
|
|
| 149 |
| Stage | Node type | Num. nodes | GPU type | GPUs per node |
|
| 150 |
| --- | --- | --- | --- | --- |
|
| 151 |
| Pre-training | [`Standard_NC96ads_A100_v4`](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nca100v4-series?tabs=sizeaccelerators) | 1 | NVIDIA A100 (80 GB) | 4 |
|
| 152 |
-
| Evaluation
|
| 153 |
|
| 154 |
#### Software
|
| 155 |
|
|
|
|
| 31 |
COLIPRI is shared for research purposes only.
|
| 32 |
It is **not meant to be used for clinical practice**.
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
The encoders be plugged to other models, or used independently or jointly for many downstream tasks, such as:
|
| 35 |
|
| 36 |
- Image classification with text prompts
|
|
|
|
| 47 |
|
| 48 |
Fine-tuning COLIPRI is typically not necessary to obtain good performance in downstream tasks.
|
| 49 |
|
| 50 |
+
## Getting started
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
|
| 52 |
+
### Installation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
```shell
|
| 55 |
pip install git+https://huggingface.co/microsoft/colipri.git
|
| 56 |
```
|
| 57 |
|
| 58 |
+
### Usage examples
|
| 59 |
|
| 60 |
Below we share some usage snippets to get started with COLIPRI.
|
| 61 |
A more complete [Jupyter notebook](./COLIPRI_demo.ipynb) is also available.
|
|
|
|
| 83 |
>>> processor = get_processor()
|
| 84 |
```
|
| 85 |
|
| 86 |
+
#### Zero-shot classification
|
| 87 |
|
| 88 |
```python
|
| 89 |
>>> from colipri import ZeroShotImageClassificationPipeline
|
|
|
|
| 95 |
]
|
| 96 |
```
|
| 97 |
|
| 98 |
+
#### Feature extraction
|
| 99 |
|
| 100 |
```python
|
| 101 |
>>> import torch
|
|
|
|
| 115 |
torch.Size([1, 768])
|
| 116 |
```
|
| 117 |
|
| 118 |
+
## Biases, risks, and limitations
|
| 119 |
+
|
| 120 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 121 |
+
|
| 122 |
+
COLIPRI was trained with data from Turkey and the USA only, therefore it might be biased towards population in the training data.
|
| 123 |
+
Underlying biases of the training datasets may not be well characterized.
|
| 124 |
+
|
| 125 |
## Environmental impact
|
| 126 |
|
| 127 |
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
|
|
|
| 143 |
| Stage | Node type | Num. nodes | GPU type | GPUs per node |
|
| 144 |
| --- | --- | --- | --- | --- |
|
| 145 |
| Pre-training | [`Standard_NC96ads_A100_v4`](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nca100v4-series?tabs=sizeaccelerators) | 1 | NVIDIA A100 (80 GB) | 4 |
|
| 146 |
+
| Evaluation | [`Standard_NC24ads_A100_v4`](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nca100v4-series?tabs=sizeaccelerators) | 1 | NVIDIA A100 (80 GB) | 1 |
|
| 147 |
|
| 148 |
#### Software
|
| 149 |
|