Rename nemo retriever references to nemotron
Browse files- Dockerfile +3 -3
- README.md +8 -8
- docker-compose.yaml +1 -1
- example.py +1 -1
- pixi.toml +1 -1
- quickstart.md +5 -5
Dockerfile
CHANGED
|
@@ -8,11 +8,11 @@ ENV TORCH_CUDA_ARCH_LIST=${TORCH_CUDA_ARCH_LIST}
|
|
| 8 |
RUN --mount=type=cache,target=/root/.cache/pip \
|
| 9 |
pip install -U pip hatchling "setuptools>=68" --root-user-action ignore
|
| 10 |
|
| 11 |
-
COPY
|
| 12 |
-
WORKDIR /workspace/
|
| 13 |
|
| 14 |
# Ensure no prebuilt binaries/artifacts from the host are present
|
| 15 |
-
RUN rm -f src/
|
| 16 |
&& rm -rf build/ dist/
|
| 17 |
|
| 18 |
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
|
|
| 8 |
RUN --mount=type=cache,target=/root/.cache/pip \
|
| 9 |
pip install -U pip hatchling "setuptools>=68" --root-user-action ignore
|
| 10 |
|
| 11 |
+
COPY nemotron-ocr /workspace/nemotron-ocr
|
| 12 |
+
WORKDIR /workspace/nemotron-ocr
|
| 13 |
|
| 14 |
# Ensure no prebuilt binaries/artifacts from the host are present
|
| 15 |
+
RUN rm -f src/nemotron_ocr_cpp/*.so || true \
|
| 16 |
&& rm -rf build/ dist/
|
| 17 |
|
| 18 |
RUN --mount=type=cache,target=/root/.cache/pip \
|
README.md
CHANGED
|
@@ -35,7 +35,7 @@ The NeMo Retriever OCR v1 model is part of the NVIDIA NeMo Retriever collection
|
|
| 35 |
|
| 36 |
This model is ready for commercial use.
|
| 37 |
|
| 38 |
-
We are excited to announce the open sourcing of this commercial model. For users interested in deploying this model in production environments, it is also available via the model API in NVIDIA Inference Microservices (NIM) at [
|
| 39 |
|
| 40 |
### **License/Terms of use**
|
| 41 |
|
|
@@ -61,7 +61,7 @@ The **NeMo Retriever OCR v1** model is designed for high-accuracy and high-speed
|
|
| 61 |
|
| 62 |
### Release Date
|
| 63 |
|
| 64 |
-
10/23/2025 via https://huggingface.co/nvidia/
|
| 65 |
|
| 66 |
### References
|
| 67 |
|
|
@@ -163,11 +163,11 @@ git lfs install
|
|
| 163 |
```
|
| 164 |
- Using https
|
| 165 |
```
|
| 166 |
-
git clone https://huggingface.co/nvidia/
|
| 167 |
```
|
| 168 |
- Or using ssh
|
| 169 |
```
|
| 170 |
-
git clone git@hf.co:nvidia/
|
| 171 |
```
|
| 172 |
|
| 173 |
2. Installation
|
|
@@ -179,7 +179,7 @@ git clone git@hf.co:nvidia/nemoretriever-ocr-v1
|
|
| 179 |
- Run the following command to install the package:
|
| 180 |
|
| 181 |
```bash
|
| 182 |
-
cd
|
| 183 |
pip install hatchling
|
| 184 |
pip install -v .
|
| 185 |
```
|
|
@@ -197,7 +197,7 @@ docker run --rm --gpus all nvcr.io/nvidia/pytorch:25.09-py3 nvidia-smi
|
|
| 197 |
- From the repo root, bring up the service to run the example against the provided image `ocr-example-image.png`:
|
| 198 |
|
| 199 |
```bash
|
| 200 |
-
docker compose run --rm
|
| 201 |
bash -lc "python example.py ocr-example-input-1.png --merge-level paragraph"
|
| 202 |
```
|
| 203 |
|
|
@@ -212,7 +212,7 @@ Output is saved next to your input image as `<name>-annotated.<ext>` on the host
|
|
| 212 |
3. Run the model using the following code:
|
| 213 |
|
| 214 |
```python
|
| 215 |
-
from
|
| 216 |
|
| 217 |
ocr = NemoRetrieverOCR()
|
| 218 |
|
|
@@ -247,7 +247,7 @@ This AI model can be embedded as an Application Programming Interface (API) call
|
|
| 247 |
|
| 248 |
## Model Version(s):
|
| 249 |
|
| 250 |
-
* `
|
| 251 |
|
| 252 |
## **Training and Evaluation Datasets:**
|
| 253 |
|
|
|
|
| 35 |
|
| 36 |
This model is ready for commercial use.
|
| 37 |
|
| 38 |
+
We are excited to announce the open sourcing of this commercial model. For users interested in deploying this model in production environments, it is also available via the model API in NVIDIA Inference Microservices (NIM) at [nemotron-ocr-v1](https://build.nvidia.com/nvidia/nemotron-ocr-v1).
|
| 39 |
|
| 40 |
### **License/Terms of use**
|
| 41 |
|
|
|
|
| 61 |
|
| 62 |
### Release Date
|
| 63 |
|
| 64 |
+
10/23/2025 via https://huggingface.co/nvidia/nemotron-ocr-v1
|
| 65 |
|
| 66 |
### References
|
| 67 |
|
|
|
|
| 163 |
```
|
| 164 |
- Using https
|
| 165 |
```
|
| 166 |
+
git clone https://huggingface.co/nvidia/nemotron-ocr-v1
|
| 167 |
```
|
| 168 |
- Or using ssh
|
| 169 |
```
|
| 170 |
+
git clone git@hf.co:nvidia/nemotron-ocr-v1
|
| 171 |
```
|
| 172 |
|
| 173 |
2. Installation
|
|
|
|
| 179 |
- Run the following command to install the package:
|
| 180 |
|
| 181 |
```bash
|
| 182 |
+
cd nemotron-ocr
|
| 183 |
pip install hatchling
|
| 184 |
pip install -v .
|
| 185 |
```
|
|
|
|
| 197 |
- From the repo root, bring up the service to run the example against the provided image `ocr-example-image.png`:
|
| 198 |
|
| 199 |
```bash
|
| 200 |
+
docker compose run --rm nemotron-ocr \
|
| 201 |
bash -lc "python example.py ocr-example-input-1.png --merge-level paragraph"
|
| 202 |
```
|
| 203 |
|
|
|
|
| 212 |
3. Run the model using the following code:
|
| 213 |
|
| 214 |
```python
|
| 215 |
+
from nemotron_ocr.inference.pipeline import NemoRetrieverOCR
|
| 216 |
|
| 217 |
ocr = NemoRetrieverOCR()
|
| 218 |
|
|
|
|
| 247 |
|
| 248 |
## Model Version(s):
|
| 249 |
|
| 250 |
+
* `nemotron-ocr-v1`
|
| 251 |
|
| 252 |
## **Training and Evaluation Datasets:**
|
| 253 |
|
docker-compose.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
services:
|
| 2 |
-
|
| 3 |
build:
|
| 4 |
context: .
|
| 5 |
dockerfile: Dockerfile
|
|
|
|
| 1 |
services:
|
| 2 |
+
nemotron-ocr:
|
| 3 |
build:
|
| 4 |
context: .
|
| 5 |
dockerfile: Dockerfile
|
example.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
|
| 5 |
import argparse
|
| 6 |
|
| 7 |
-
from
|
| 8 |
|
| 9 |
|
| 10 |
def main(image_path, merge_level, no_visualize, model_dir):
|
|
|
|
| 4 |
|
| 5 |
import argparse
|
| 6 |
|
| 7 |
+
from nemotron_ocr.inference.pipeline import NemoRetrieverOCR
|
| 8 |
|
| 9 |
|
| 10 |
def main(image_path, merge_level, no_visualize, model_dir):
|
pixi.toml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
[workspace]
|
| 2 |
authors = ["Charles Blackmon-Luca <20627856+charlesbluca@users.noreply.github.com>"]
|
| 3 |
channels = ["conda-forge", "nvidia"]
|
| 4 |
-
name = "
|
| 5 |
platforms = ["linux-64"]
|
| 6 |
version = "0.1.0"
|
| 7 |
|
|
|
|
| 1 |
[workspace]
|
| 2 |
authors = ["Charles Blackmon-Luca <20627856+charlesbluca@users.noreply.github.com>"]
|
| 3 |
channels = ["conda-forge", "nvidia"]
|
| 4 |
+
name = "nemotron-ocr"
|
| 5 |
platforms = ["linux-64"]
|
| 6 |
version = "0.1.0"
|
| 7 |
|
quickstart.md
CHANGED
|
@@ -14,25 +14,25 @@ Create pixi environment and enter activated shell:
|
|
| 14 |
pixi s
|
| 15 |
```
|
| 16 |
|
| 17 |
-
Create a virtualenv and install
|
| 18 |
|
| 19 |
```bash
|
| 20 |
uv venv \
|
| 21 |
-
&& uv pip install -e ./
|
| 22 |
```
|
| 23 |
|
| 24 |
Assert that OCR inference libraries can now be imported successfully:
|
| 25 |
|
| 26 |
```bash
|
| 27 |
-
uv run python -c "import
|
| 28 |
```
|
| 29 |
|
| 30 |
## Usage
|
| 31 |
|
| 32 |
-
`
|
| 33 |
|
| 34 |
```python
|
| 35 |
-
from
|
| 36 |
|
| 37 |
ocr = NemoRetrieverOCR()
|
| 38 |
|
|
|
|
| 14 |
pixi s
|
| 15 |
```
|
| 16 |
|
| 17 |
+
Create a virtualenv and install nemotron-ocr into it via `uv`:
|
| 18 |
|
| 19 |
```bash
|
| 20 |
uv venv \
|
| 21 |
+
&& uv pip install -e ./nemotron-ocr -v
|
| 22 |
```
|
| 23 |
|
| 24 |
Assert that OCR inference libraries can now be imported successfully:
|
| 25 |
|
| 26 |
```bash
|
| 27 |
+
uv run python -c "import nemotron_ocr; import nemotron_ocr_cpp"
|
| 28 |
```
|
| 29 |
|
| 30 |
## Usage
|
| 31 |
|
| 32 |
+
`nemotron_ocr.inference.pipeline.NemoRetrieverOCR` is the main entry point for performing OCR inference; it can be used to iterate over predictions for a given input image:
|
| 33 |
|
| 34 |
```python
|
| 35 |
+
from nemotron_ocr.inference.pipeline import NemoRetrieverOCR
|
| 36 |
|
| 37 |
ocr = NemoRetrieverOCR()
|
| 38 |
|