Metadata-Version: 2.4
Name: rawforgeonnx
Version: 0.3.4
Summary: A compute backend/CLI application for using machine learning models on raw images.
Author: Ryan Mueller
License: MIT License
        
        Copyright (c) 2025 rymuelle
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/rymuelle/RawForge
Project-URL: Bug Tracker, https://github.com/rymuelle/RawForge/issues
Keywords: python,Machine Learning,Camera Raw
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=2.2
Requires-Dist: RawHandler~=0.2.0
Requires-Dist: colour_demosaicing~=0.2.6
Requires-Dist: blended-tiling-numpy
Requires-Dist: requests~=2.32
Requires-Dist: platformdirs~=4.5
Requires-Dist: tqdm~=4.67
Requires-Dist: cryptography>=46.0
Requires-Dist: tifffile
Provides-Extra: cpu
Requires-Dist: onnxruntime; extra == "cpu"
Provides-Extra: cuda
Requires-Dist: onnxruntime-gpu; extra == "cuda"
Provides-Extra: web
Requires-Dist: onnxruntime-webgpu; extra == "web"
Provides-Extra: directml
Requires-Dist: onnxruntime-directml; extra == "directml"
Provides-Extra: torch
Requires-Dist: torch; extra == "torch"
Provides-Extra: fastapi
Requires-Dist: fastapi; extra == "fastapi"
Requires-Dist: pydantic; extra == "fastapi"
Requires-Dist: uvicorn; extra == "fastapi"
Dynamic: license-file

# RawRefinery

[![PyPI version](https://img.shields.io/pypi/v/rawforge.svg)](https://pypi.org/project/rawforge/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python version](https://img.shields.io/pypi/pyversions/rawforge.svg)](https://pypi.org/project/rawforge/)

**RawForge** is an open-source command line application for **raw image quality refinement and denoising**.

Currently in **alpha release**.

---

## Install from pip:
```bash
pip install rawforge
```


## New: ONNX backend!

### NVIDIA: For cuda (tested, must have CUDA installed):

```bash
pip install rawforgeonnx[cuda]
```

### AMD and NVIDIA on Windows:

```bash
pip install rawforgeonnx[directml]
```


### All others, including M1+ Macs (CoreML)

```bash
pip install rawforgeonnx[cpu]
```

### For web:

```bash
pip install rawforgeonnx[web]
```

Useage is the same, but use the CLI "rawforgeonnx".


```bash
rawforgeonnx TreeNetDenoiseHeavy test.CR2 test_heavy.dng --cfa 
```

---
## Example command line syntax:

```bash
rawforge TreeNetDenoiseHeavy test.CR2 test_heavy.dng --cfa 
```


```bash 
usage: rawforge [-h] [--conditioning CONDITIONING] [--dims x0 x1 y0 y1] [--cfa] [--device DEVICE] [--disable_tqdm] [--tile_size TILE_SIZE] [--lumi LUMI] [--chroma CHROMA] model in_file out_file

A command line utility for processing raw images.

positional arguments:
  model                 The name of the model to use.
  in_file               The name of the file to open.
  out_file              The name of the file to save.

options:
  -h, --help            show this help message and exit
  --conditioning CONDITIONING
                        Conditioning array to feed model.
  --dims x0 x1 y0 y1    Optional crop dimensions.
  --cfa                 Save the image as a CFA image (default: False).
  --device DEVICE       Set device backend (cuda, cpu, mps).
  --disable_tqdm        Disable the progress bar.
  --tile_size TILE_SIZE
                        Set tile size. (default: 256)
  --lumi LUMI           Lumi noise (0-1).
  --chroma CHROMA       Chroma noise (0-1).
```




----

## Acknowledgments

With thanks to:


> Brummer, Benoit; De Vleeschouwer, Christophe. (2025).
> *Raw Natural Image Noise Dataset.*
> [https://doi.org/10.14428/DVN/DEQCIM](https://doi.org/10.14428/DVN/DEQCIM), Open Data @ UCLouvain, V1.

> Chen, Liangyu; Chu, Xiaojie; Zhang, Xiangyu; Chen, Jianhao. (2022).
> *NAFNet: Simple Baselines for Image Restoration.*
> [https://doi.org/10.48550/arXiv.2208.04677](https://doi.org/10.48550/arXiv.2208.04677), arXiv, V1.
