Spaces:
Sleeping
Sleeping
fix: consolidate Hugging Face metadata into main README
Browse files
README.md
CHANGED
|
@@ -1,530 +1,97 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
-
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
## Features
|
| 23 |
|
| 24 |
### Core Calibration
|
| 25 |
- **Step Tablet Reading**: Automated detection and density extraction from scanned step tablets
|
| 26 |
-
- **
|
| 27 |
-
- **
|
| 28 |
-
- **Auto-Linearization**: Multiple algorithms (spline, polynomial, iterative) for automatic curve generation
|
| 29 |
-
- **Curve Editor**: Interactive curve editing with smoothing and AI enhancement
|
| 30 |
-
- **Multi-Format Export**: Export to QuadTone RIP, Piezography, CSV, and JSON formats
|
| 31 |
|
| 32 |
### Image Processing
|
| 33 |
- **Image Preview**: Preview curve effects on images before processing
|
| 34 |
- **Digital Negative Creation**: Create inverted negatives with curves applied
|
| 35 |
-
- **
|
| 36 |
-
- **Histogram Analysis**: Zone-based tonal distribution analysis with clipping detection
|
| 37 |
|
| 38 |
### Printing Tools
|
| 39 |
- **Chemistry Calculator**: Calculate coating solutions based on Bostick-Sullivan formulas
|
| 40 |
-
- **Exposure Calculator**:
|
| 41 |
- **Zone System**: Ansel Adams zone analysis with development recommendations
|
| 42 |
-
- **Soft Proofing**: Preview prints on different paper types
|
| 43 |
-
- **Paper Profiles Database**: Browse and manage paper profiles with recommended settings
|
| 44 |
-
- **Print Session Log**: Track prints and build process knowledge over time
|
| 45 |
-
|
| 46 |
-
### Machine Learning
|
| 47 |
-
- **Density Prediction**: ML models learn from your calibration history to predict results
|
| 48 |
-
- **Active Learning**: Intelligent suggestions for the most informative test prints
|
| 49 |
-
- **Transfer Learning**: Bootstrap new paper calibrations from similar known papers
|
| 50 |
|
| 51 |
### AI Assistance
|
| 52 |
-
- **Natural Language Chat**: Ask questions about Pt/Pd printing
|
| 53 |
-
- **Recipe Suggestions**: Get customized coating recipes
|
| 54 |
-
- **Troubleshooting**: Diagnose common problems with AI
|
| 55 |
-
|
| 56 |
-
## Installation
|
| 57 |
-
|
| 58 |
-
### Basic Installation
|
| 59 |
-
|
| 60 |
-
```bash
|
| 61 |
-
pip install ptpd-calibration
|
| 62 |
-
```
|
| 63 |
-
|
| 64 |
-
### With Optional Dependencies
|
| 65 |
-
|
| 66 |
-
```bash
|
| 67 |
-
# Machine Learning features
|
| 68 |
-
pip install ptpd-calibration[ml]
|
| 69 |
-
|
| 70 |
-
# LLM integration (Claude/GPT)
|
| 71 |
-
pip install ptpd-calibration[llm]
|
| 72 |
-
|
| 73 |
-
# Gradio UI
|
| 74 |
-
pip install ptpd-calibration[ui]
|
| 75 |
-
|
| 76 |
-
# Everything
|
| 77 |
-
pip install ptpd-calibration[all]
|
| 78 |
-
```
|
| 79 |
-
|
| 80 |
-
### From Source
|
| 81 |
-
|
| 82 |
-
```bash
|
| 83 |
-
git clone https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool.git
|
| 84 |
-
cd Platinum-Palladium-AI-Printing-Tool
|
| 85 |
-
pip install -e ".[all]"
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
## Quick Start
|
| 89 |
-
|
| 90 |
-
### 1. Basic Calibration Workflow
|
| 91 |
-
|
| 92 |
-
```python
|
| 93 |
-
from ptpd_calibration import StepTabletReader, CurveGenerator, CurveType, save_curve
|
| 94 |
-
|
| 95 |
-
# Read your scanned step tablet
|
| 96 |
-
reader = StepTabletReader()
|
| 97 |
-
result = reader.read("step_tablet_scan.tiff")
|
| 98 |
-
|
| 99 |
-
# Check the results
|
| 100 |
-
densities = result.extraction.get_densities()
|
| 101 |
-
print(f"Dmax: {max(densities):.2f}")
|
| 102 |
-
print(f"Dmin: {min(densities):.2f}")
|
| 103 |
-
|
| 104 |
-
# Generate linearization curve
|
| 105 |
-
generator = CurveGenerator()
|
| 106 |
-
curve = generator.generate_from_extraction(
|
| 107 |
-
result.extraction,
|
| 108 |
-
curve_type=CurveType.LINEAR,
|
| 109 |
-
name="My Paper - Standard",
|
| 110 |
-
paper_type="Arches Platine",
|
| 111 |
-
)
|
| 112 |
-
|
| 113 |
-
# Export for your RIP
|
| 114 |
-
save_curve(curve, "my_curve.txt", format="qtr")
|
| 115 |
-
```
|
| 116 |
-
|
| 117 |
-
### 2. Chemistry Calculation
|
| 118 |
-
|
| 119 |
-
```python
|
| 120 |
-
from ptpd_calibration.chemistry import ChemistryCalculator
|
| 121 |
-
|
| 122 |
-
calculator = ChemistryCalculator()
|
| 123 |
-
|
| 124 |
-
# Calculate for an 8x10 print
|
| 125 |
-
recipe = calculator.calculate(
|
| 126 |
-
width_inches=8.0,
|
| 127 |
-
height_inches=10.0,
|
| 128 |
-
platinum_ratio=0.5, # 50/50 Pt/Pd
|
| 129 |
-
)
|
| 130 |
-
|
| 131 |
-
print(f"Ferric Oxalate: {recipe.ferric_oxalate_drops:.0f} drops")
|
| 132 |
-
print(f"Platinum: {recipe.platinum_drops:.0f} drops")
|
| 133 |
-
print(f"Palladium: {recipe.palladium_drops:.0f} drops")
|
| 134 |
-
print(f"Total: {recipe.total_drops:.0f} drops ({recipe.total_ml:.2f} ml)")
|
| 135 |
-
```
|
| 136 |
-
|
| 137 |
-
### 3. Exposure Calculation
|
| 138 |
-
|
| 139 |
-
```python
|
| 140 |
-
from ptpd_calibration.exposure import ExposureCalculator, ExposureSettings
|
| 141 |
-
|
| 142 |
-
settings = ExposureSettings(
|
| 143 |
-
base_exposure_minutes=10.0,
|
| 144 |
-
base_negative_density=1.6,
|
| 145 |
-
)
|
| 146 |
-
calculator = ExposureCalculator(settings)
|
| 147 |
-
|
| 148 |
-
# Calculate for your negative
|
| 149 |
-
result = calculator.calculate(negative_density=1.8)
|
| 150 |
-
print(f"Exposure time: {result.format_time()}")
|
| 151 |
-
|
| 152 |
-
# Generate test strip
|
| 153 |
-
times = calculator.calculate_test_strip(10.0, steps=5, increment_stops=0.5)
|
| 154 |
-
for i, t in enumerate(times, 1):
|
| 155 |
-
print(f"Strip {i}: {t:.1f} min")
|
| 156 |
-
```
|
| 157 |
-
|
| 158 |
-
### 4. Run the Web UI
|
| 159 |
-
|
| 160 |
-
```bash
|
| 161 |
-
python -m ptpd_calibration.ui.gradio_app
|
| 162 |
-
```
|
| 163 |
-
|
| 164 |
-
Then open http://localhost:7860
|
| 165 |
-
|
| 166 |
-
## Complete Feature Guide
|
| 167 |
-
|
| 168 |
-
### Auto-Linearization
|
| 169 |
-
|
| 170 |
-
Generate curves automatically from density measurements:
|
| 171 |
-
|
| 172 |
-
```python
|
| 173 |
-
from ptpd_calibration.curves import AutoLinearizer, LinearizationMethod
|
| 174 |
-
|
| 175 |
-
# Your measured densities from a step wedge
|
| 176 |
-
densities = [0.08, 0.15, 0.28, 0.45, 0.68, 0.95, 1.25, 1.48, 1.60]
|
| 177 |
-
|
| 178 |
-
linearizer = AutoLinearizer()
|
| 179 |
-
result = linearizer.linearize(
|
| 180 |
-
densities,
|
| 181 |
-
method=LinearizationMethod.SPLINE_FIT,
|
| 182 |
-
curve_name="Auto-Linearized Curve",
|
| 183 |
-
)
|
| 184 |
-
|
| 185 |
-
print(f"Method: {result.method_used.value}")
|
| 186 |
-
print(f"Residual error: {result.residual_error:.4f}")
|
| 187 |
-
```
|
| 188 |
-
|
| 189 |
-
Available methods:
|
| 190 |
-
- `DIRECT_INVERSION`: Simple inversion of measured response
|
| 191 |
-
- `SPLINE_FIT`: Smooth cubic spline interpolation
|
| 192 |
-
- `POLYNOMIAL_FIT`: Polynomial curve fitting
|
| 193 |
-
- `ITERATIVE`: Iterative refinement for best fit
|
| 194 |
-
- `HYBRID`: Combines multiple methods
|
| 195 |
-
|
| 196 |
-
### Zone System Analysis
|
| 197 |
-
|
| 198 |
-
Analyze images using Ansel Adams' zone system:
|
| 199 |
-
|
| 200 |
-
```python
|
| 201 |
-
from ptpd_calibration.zones import ZoneMapper
|
| 202 |
-
from PIL import Image
|
| 203 |
-
|
| 204 |
-
image = Image.open("your_image.tiff")
|
| 205 |
-
mapper = ZoneMapper()
|
| 206 |
-
analysis = mapper.analyze_image(image)
|
| 207 |
-
|
| 208 |
-
print(f"Development: {analysis.development_adjustment}")
|
| 209 |
-
# Outputs: N-2, N-1, N, N+1, or N+2
|
| 210 |
-
```
|
| 211 |
-
|
| 212 |
-
### Histogram Analysis
|
| 213 |
-
|
| 214 |
-
Get detailed tonal analysis with zone distribution:
|
| 215 |
-
|
| 216 |
-
```python
|
| 217 |
-
from ptpd_calibration.imaging import HistogramAnalyzer
|
| 218 |
-
from PIL import Image
|
| 219 |
-
|
| 220 |
-
image = Image.open("your_image.tiff")
|
| 221 |
-
analyzer = HistogramAnalyzer()
|
| 222 |
-
result = analyzer.analyze(image)
|
| 223 |
-
|
| 224 |
-
print(f"Mean: {result.stats.mean:.1f}")
|
| 225 |
-
print(f"Dynamic range: {result.stats.dynamic_range:.0f} levels")
|
| 226 |
-
print(f"Brightness: {result.stats.brightness:.2f}")
|
| 227 |
-
print(f"Contrast: {result.stats.contrast:.2f}")
|
| 228 |
-
```
|
| 229 |
-
|
| 230 |
-
### Soft Proofing
|
| 231 |
-
|
| 232 |
-
Preview how your image will look on different papers:
|
| 233 |
-
|
| 234 |
-
```python
|
| 235 |
-
from ptpd_calibration.proofing import SoftProofer, ProofSettings, PaperSimulation
|
| 236 |
-
from PIL import Image
|
| 237 |
|
| 238 |
-
|
| 239 |
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 244 |
|
| 245 |
-
#
|
| 246 |
-
result.image.save("proof_arches.jpg")
|
| 247 |
-
```
|
| 248 |
-
|
| 249 |
-
Available paper presets:
|
| 250 |
-
- `ARCHES_PLATINE`: Dmax 1.6, smooth surface
|
| 251 |
-
- `BERGGER_COT320`: Dmax 1.55, cotton rag
|
| 252 |
-
- `HAHNEMUHLE_PLATINUM`: Dmax 1.65, fine art paper
|
| 253 |
-
- `STONEHENGE`: Dmax 1.4, warm tone
|
| 254 |
-
- `REVERE_PLATINUM`: Dmax 1.5, bright white
|
| 255 |
-
|
| 256 |
-
### Paper Profiles
|
| 257 |
-
|
| 258 |
-
Browse and use paper characteristics:
|
| 259 |
-
|
| 260 |
-
```python
|
| 261 |
-
from ptpd_calibration.papers import PaperDatabase
|
| 262 |
-
|
| 263 |
-
db = PaperDatabase()
|
| 264 |
-
|
| 265 |
-
# List all papers
|
| 266 |
-
for paper in db.list_papers():
|
| 267 |
-
print(f"{paper.name}: Dmax {paper.characteristics.typical_dmax}")
|
| 268 |
-
|
| 269 |
-
# Get specific paper
|
| 270 |
-
arches = db.get_paper("arches_platine")
|
| 271 |
-
print(f"Sizing: {arches.characteristics.sizing}")
|
| 272 |
-
print(f"Surface: {arches.characteristics.surface}")
|
| 273 |
-
```
|
| 274 |
-
|
| 275 |
-
### Digital Negative Creation
|
| 276 |
-
|
| 277 |
-
Create print-ready negatives with curve correction:
|
| 278 |
-
|
| 279 |
-
```python
|
| 280 |
-
from ptpd_calibration.imaging import ImageProcessor
|
| 281 |
-
from ptpd_calibration.core.models import CurveData
|
| 282 |
-
|
| 283 |
-
processor = ImageProcessor()
|
| 284 |
-
|
| 285 |
-
# Create negative with curve
|
| 286 |
-
result = processor.create_digital_negative(
|
| 287 |
-
"your_image.tiff",
|
| 288 |
-
curve=your_curve,
|
| 289 |
-
invert=True,
|
| 290 |
-
)
|
| 291 |
-
|
| 292 |
-
result.image.save("negative.tiff")
|
| 293 |
-
```
|
| 294 |
-
|
| 295 |
-
### Print Session Logging
|
| 296 |
-
|
| 297 |
-
Track your prints over time:
|
| 298 |
-
|
| 299 |
-
```python
|
| 300 |
-
from ptpd_calibration.session import SessionLogger, PrintRecord
|
| 301 |
-
from ptpd_calibration.session.logger import ChemistryUsed, PrintResult
|
| 302 |
-
|
| 303 |
-
logger = SessionLogger()
|
| 304 |
-
session = logger.start_session("Evening Print Session")
|
| 305 |
-
|
| 306 |
-
# Log a print
|
| 307 |
-
record = PrintRecord(
|
| 308 |
-
image_name="Portrait Study",
|
| 309 |
-
paper_type="Arches Platine",
|
| 310 |
-
exposure_time_minutes=12.0,
|
| 311 |
-
chemistry=ChemistryUsed(
|
| 312 |
-
ferric_oxalate_drops=15.0,
|
| 313 |
-
platinum_drops=8.0,
|
| 314 |
-
palladium_drops=7.0,
|
| 315 |
-
),
|
| 316 |
-
result=PrintResult.EXCELLENT,
|
| 317 |
-
)
|
| 318 |
-
logger.log_print(record)
|
| 319 |
-
|
| 320 |
-
# Get statistics
|
| 321 |
-
stats = logger.get_current_session().get_statistics()
|
| 322 |
-
print(f"Total prints: {stats['total_prints']}")
|
| 323 |
-
print(f"Success rate: {stats['success_rate']}")
|
| 324 |
-
```
|
| 325 |
-
|
| 326 |
-
### Curve Export Formats
|
| 327 |
-
|
| 328 |
-
Export curves in multiple formats:
|
| 329 |
-
|
| 330 |
-
```python
|
| 331 |
-
from ptpd_calibration.curves import save_curve
|
| 332 |
-
|
| 333 |
-
# QuadTone RIP format
|
| 334 |
-
save_curve(curve, "curve.txt", format="qtr")
|
| 335 |
-
|
| 336 |
-
# CSV for spreadsheets
|
| 337 |
-
save_curve(curve, "curve.csv", format="csv")
|
| 338 |
-
|
| 339 |
-
# JSON with full metadata
|
| 340 |
-
save_curve(curve, "curve.json", format="json")
|
| 341 |
-
```
|
| 342 |
-
|
| 343 |
-
## Web UI
|
| 344 |
-
|
| 345 |
-
The Gradio web interface provides 21 tabs for all functionality:
|
| 346 |
|
| 347 |
| Tab | Description |
|
| 348 |
|-----|-------------|
|
| 349 |
| Step Tablet | Read and analyze step tablet scans |
|
| 350 |
| Curve Editor | Create and edit linearization curves |
|
| 351 |
| AI Enhance | Improve curves with AI suggestions |
|
| 352 |
-
| Step Wedge Analysis | Comprehensive quality analysis |
|
| 353 |
-
| Curve Visualizer | View curve statistics |
|
| 354 |
| Curve Manager | Save, load, and export curves |
|
| 355 |
-
| Scanner Calibration | Calibrate your scanner |
|
| 356 |
-
| Chemistry Calculator | Calculate coating recipes |
|
| 357 |
| Settings | Configure API keys and preferences |
|
| 358 |
-
| Image Preview | Preview curve effects |
|
| 359 |
-
| Digital Negative | Create print-ready negatives |
|
| 360 |
-
| Batch Processing | Process multiple images |
|
| 361 |
| Histogram Analysis | Zone-based image analysis |
|
| 362 |
| Exposure Calculator | Calculate UV exposure times |
|
| 363 |
| Zone System | Ansel Adams zone mapping |
|
| 364 |
-
| Soft Proofing | Preview on different papers |
|
| 365 |
| Paper Profiles | Browse paper characteristics |
|
| 366 |
| Auto-Linearization | Automatic curve generation |
|
| 367 |
-
| Print Session Log | Track prints over time |
|
| 368 |
| AI Assistant | Chat about Pt/Pd printing |
|
| 369 |
-
| About |
|
| 370 |
-
|
| 371 |
-
Launch the UI:
|
| 372 |
|
| 373 |
-
|
| 374 |
-
python -m ptpd_calibration.ui.gradio_app
|
| 375 |
-
```
|
| 376 |
|
| 377 |
-
|
|
|
|
|
|
|
| 378 |
|
| 379 |
-
|
| 380 |
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
export PTPD_LLM_PROVIDER="anthropic"
|
| 385 |
-
|
| 386 |
-
# Detection Settings
|
| 387 |
-
export PTPD_DETECTION_CANNY_LOW_THRESHOLD=50
|
| 388 |
-
export PTPD_DETECTION_CANNY_HIGH_THRESHOLD=150
|
| 389 |
-
|
| 390 |
-
# Curve Settings
|
| 391 |
-
export PTPD_CURVE_NUM_OUTPUT_POINTS=256
|
| 392 |
-
export PTPD_CURVE_DEFAULT_EXPORT_FORMAT="qtr"
|
| 393 |
-
```
|
| 394 |
-
|
| 395 |
-
Or use a `.env` file in your project directory.
|
| 396 |
-
|
| 397 |
-
## Project Structure
|
| 398 |
-
|
| 399 |
-
```
|
| 400 |
-
src/ptpd_calibration/
|
| 401 |
-
├── __init__.py # Main API exports
|
| 402 |
-
├── config.py # Configuration management
|
| 403 |
-
├── core/ # Core data models
|
| 404 |
-
│ ├── models.py # Pydantic models
|
| 405 |
-
│ └── types.py # Domain types
|
| 406 |
-
├── detection/ # Step tablet detection
|
| 407 |
-
│ ├── detector.py # Patch detection
|
| 408 |
-
│ ├── extractor.py # Density extraction
|
| 409 |
-
│ ├── reader.py # High-level reader
|
| 410 |
-
│ └── scanner.py # Scanner calibration
|
| 411 |
-
├── curves/ # Curve generation
|
| 412 |
-
│ ├── generator.py # Curve calculation
|
| 413 |
-
│ ├── export.py # Format export
|
| 414 |
-
│ ├── analysis.py # Curve analysis
|
| 415 |
-
│ ├── visualization.py # Curve display & statistics
|
| 416 |
-
│ ├── linearization.py # Auto-linearization algorithms
|
| 417 |
-
│ └── modifier.py # Curve editing & smoothing
|
| 418 |
-
├── imaging/ # Image processing
|
| 419 |
-
│ ├── processor.py # Digital negative creation
|
| 420 |
-
│ └── histogram.py # Histogram & zone analysis
|
| 421 |
-
├── chemistry/ # Chemistry calculations
|
| 422 |
-
│ └── calculator.py # Coating recipe calculator
|
| 423 |
-
├── exposure/ # Exposure tools
|
| 424 |
-
│ └── calculator.py # UV exposure calculator
|
| 425 |
-
├── zones/ # Zone System
|
| 426 |
-
│ └── mapping.py # Ansel Adams zone mapping
|
| 427 |
-
├── proofing/ # Soft proofing
|
| 428 |
-
│ └── simulation.py # Print preview simulation
|
| 429 |
-
├── papers/ # Paper database
|
| 430 |
-
│ └── profiles.py # Paper profiles & settings
|
| 431 |
-
├── session/ # Session management
|
| 432 |
-
│ └── logger.py # Print session logging
|
| 433 |
-
├── analysis/ # Analysis tools
|
| 434 |
-
│ └── wedge_analyzer.py # Step wedge analysis
|
| 435 |
-
├── ml/ # Machine learning
|
| 436 |
-
│ ├── database.py # Calibration storage
|
| 437 |
-
│ ├── predictor.py # ML prediction
|
| 438 |
-
│ ├── active_learning.py # Experiment suggestion
|
| 439 |
-
│ └── transfer.py # Transfer learning
|
| 440 |
-
├── llm/ # LLM integration
|
| 441 |
-
│ ├── client.py # API clients
|
| 442 |
-
│ ├── assistant.py # Chat assistant
|
| 443 |
-
│ └── prompts.py # Domain prompts
|
| 444 |
-
├── agents/ # Agentic system
|
| 445 |
-
│ ├── agent.py # Main agent
|
| 446 |
-
│ ├── tools.py # Tool definitions
|
| 447 |
-
│ └── memory.py # Persistent memory
|
| 448 |
-
└── ui/ # User interfaces
|
| 449 |
-
└── gradio_app.py # Gradio UI (21 tabs)
|
| 450 |
-
```
|
| 451 |
-
|
| 452 |
-
## Examples
|
| 453 |
-
|
| 454 |
-
Run the comprehensive demo to see all features:
|
| 455 |
-
|
| 456 |
-
```bash
|
| 457 |
-
python examples/comprehensive_demo.py
|
| 458 |
-
```
|
| 459 |
-
|
| 460 |
-
Run the quick start guide:
|
| 461 |
-
|
| 462 |
-
```bash
|
| 463 |
-
python examples/quick_start.py
|
| 464 |
-
```
|
| 465 |
-
|
| 466 |
-
## Development
|
| 467 |
-
|
| 468 |
-
### Setup Development Environment
|
| 469 |
-
|
| 470 |
-
```bash
|
| 471 |
-
git clone https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool.git
|
| 472 |
-
cd Platinum-Palladium-AI-Printing-Tool
|
| 473 |
-
python -m venv venv
|
| 474 |
-
source venv/bin/activate
|
| 475 |
-
pip install -e ".[dev,all]"
|
| 476 |
-
```
|
| 477 |
-
|
| 478 |
-
### Running Tests
|
| 479 |
-
|
| 480 |
-
```bash
|
| 481 |
-
# All tests (460+ tests)
|
| 482 |
-
pytest
|
| 483 |
-
|
| 484 |
-
# With coverage
|
| 485 |
-
pytest --cov=src/ptpd_calibration --cov-report=html
|
| 486 |
-
|
| 487 |
-
# E2E user journey tests
|
| 488 |
-
pytest tests/e2e/test_user_journeys.py -v
|
| 489 |
-
|
| 490 |
-
# Sanity tests for deployment
|
| 491 |
-
pytest tests/sanity/ -v
|
| 492 |
-
```
|
| 493 |
-
|
| 494 |
-
### Test Coverage
|
| 495 |
-
|
| 496 |
-
- Unit tests: 427 tests covering all modules
|
| 497 |
-
- E2E tests: 11 complete user journey tests
|
| 498 |
-
- Sanity tests: 25 deployment verification tests
|
| 499 |
-
|
| 500 |
-
## Supported Formats
|
| 501 |
-
|
| 502 |
-
### Step Tablets
|
| 503 |
-
- Stouffer 21/31/41-step transmission wedge
|
| 504 |
-
- Custom tablets (auto-detection)
|
| 505 |
-
|
| 506 |
-
### Image Formats
|
| 507 |
-
- TIFF (recommended)
|
| 508 |
-
- PNG, JPEG
|
| 509 |
-
- Most formats supported by Pillow
|
| 510 |
-
|
| 511 |
-
### Curve Export
|
| 512 |
-
- **QuadTone RIP**: `.txt` and `.quad` profiles
|
| 513 |
-
- **Piezography**: `.ppt` format
|
| 514 |
-
- **CSV**: Standard comma-separated values
|
| 515 |
-
- **JSON**: Full metadata preservation
|
| 516 |
|
| 517 |
## License
|
| 518 |
|
| 519 |
-
MIT License - see [LICENSE](LICENSE) for details.
|
| 520 |
-
|
| 521 |
-
## Acknowledgments
|
| 522 |
-
|
| 523 |
-
- The alternative photography community for process knowledge
|
| 524 |
-
- Anthropic and OpenAI for LLM APIs
|
| 525 |
-
- The developers of QuadTone RIP and Piezography
|
| 526 |
-
|
| 527 |
-
## Support
|
| 528 |
-
|
| 529 |
-
- **Issues**: [GitHub Issues](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool/issues)
|
| 530 |
-
- **Discussions**: [GitHub Discussions](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool/discussions)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Pt/Pd Calibration Studio
|
| 3 |
+
emoji: 📷
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: gray
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "4.44.0"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
license: mit
|
| 11 |
+
tags:
|
| 12 |
+
- photography
|
| 13 |
+
- calibration
|
| 14 |
+
- platinum
|
| 15 |
+
- palladium
|
| 16 |
+
- alternative-process
|
| 17 |
+
- digital-negative
|
| 18 |
+
- curve-editor
|
| 19 |
+
short_description: AI-powered calibration for platinum/palladium printing
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# Platinum/Palladium Calibration Studio
|
| 23 |
+
|
| 24 |
+
An AI-powered calibration system for platinum/palladium alternative photographic printing.
|
| 25 |
|
| 26 |
## Features
|
| 27 |
|
| 28 |
### Core Calibration
|
| 29 |
- **Step Tablet Reading**: Automated detection and density extraction from scanned step tablets
|
| 30 |
+
- **Curve Generation**: Create linearization curves for digital negatives
|
| 31 |
+
- **Multi-Format Export**: Export to QuadTone RIP, Piezography, CSV, and JSON
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
### Image Processing
|
| 34 |
- **Image Preview**: Preview curve effects on images before processing
|
| 35 |
- **Digital Negative Creation**: Create inverted negatives with curves applied
|
| 36 |
+
- **Histogram Analysis**: Zone-based tonal distribution analysis
|
|
|
|
| 37 |
|
| 38 |
### Printing Tools
|
| 39 |
- **Chemistry Calculator**: Calculate coating solutions based on Bostick-Sullivan formulas
|
| 40 |
+
- **Exposure Calculator**: UV exposure calculations with test strip generator
|
| 41 |
- **Zone System**: Ansel Adams zone analysis with development recommendations
|
| 42 |
+
- **Soft Proofing**: Preview prints on different paper types
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
### AI Assistance
|
| 45 |
+
- **Natural Language Chat**: Ask questions about Pt/Pd printing
|
| 46 |
+
- **Recipe Suggestions**: Get customized coating recipes
|
| 47 |
+
- **Troubleshooting**: Diagnose common problems with AI guidance
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
## Usage
|
| 50 |
|
| 51 |
+
1. **Upload a step tablet scan** in the "Step Tablet" tab
|
| 52 |
+
2. **Generate curves** using the automatic or manual curve editor
|
| 53 |
+
3. **Preview effects** on your images in the "Image Preview" tab
|
| 54 |
+
4. **Export** curves in your preferred format
|
| 55 |
+
5. **Calculate chemistry** and exposure settings for your prints
|
| 56 |
|
| 57 |
+
## Tabs Overview
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
| Tab | Description |
|
| 60 |
|-----|-------------|
|
| 61 |
| Step Tablet | Read and analyze step tablet scans |
|
| 62 |
| Curve Editor | Create and edit linearization curves |
|
| 63 |
| AI Enhance | Improve curves with AI suggestions |
|
| 64 |
+
| Step Wedge Analysis | Comprehensive step wedge quality analysis |
|
| 65 |
+
| Curve Visualizer | View curve statistics and comparisons |
|
| 66 |
| Curve Manager | Save, load, and export curves |
|
| 67 |
+
| Scanner Calibration | Calibrate your scanner for accurate readings |
|
| 68 |
+
| Chemistry Calculator | Calculate coating solution recipes |
|
| 69 |
| Settings | Configure API keys and preferences |
|
| 70 |
+
| Image Preview | Preview curve effects on images |
|
| 71 |
+
| Digital Negative | Create print-ready digital negatives |
|
| 72 |
+
| Batch Processing | Process multiple images at once |
|
| 73 |
| Histogram Analysis | Zone-based image analysis |
|
| 74 |
| Exposure Calculator | Calculate UV exposure times |
|
| 75 |
| Zone System | Ansel Adams zone mapping |
|
| 76 |
+
| Soft Proofing | Preview prints on different papers |
|
| 77 |
| Paper Profiles | Browse paper characteristics |
|
| 78 |
| Auto-Linearization | Automatic curve generation |
|
| 79 |
+
| Print Session Log | Track your prints over time |
|
| 80 |
| AI Assistant | Chat about Pt/Pd printing |
|
| 81 |
+
| About | Information and help |
|
|
|
|
|
|
|
| 82 |
|
| 83 |
+
## Requirements
|
|
|
|
|
|
|
| 84 |
|
| 85 |
+
- A step tablet scan (Stouffer 21/31/41 step or similar)
|
| 86 |
+
- Images to process (TIFF recommended)
|
| 87 |
+
- Optional: API key for AI features
|
| 88 |
|
| 89 |
+
## Links
|
| 90 |
|
| 91 |
+
- [GitHub Repository](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool)
|
| 92 |
+
- [Documentation](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool#readme)
|
| 93 |
+
- [Issues](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool/issues)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
## License
|
| 96 |
|
| 97 |
+
MIT License - see [LICENSE](https://github.com/ianshank/Platinum-Palladium-AI-Printing-Tool/blob/main/LICENSE) for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|