How PhotoAIKit Is Constructed
A detailed guide to PhotoAIKit’s contracts, CLIP image and text inference, semantic comparison, SAM 3, workflows, storage, concurrency, and model identity.
RawCull is split across four reusable Swift packages. Each package owns one kind of knowledge and deliberately avoids importing the others. RawCull is the composition root: it decodes a file and capture metadata with RawParserKit, asks PhotoAnalysisKit or PhotoAIKit to measure or index it, translates the evidence into RawCullCore values and decisions, and presents or persists the outcome.
flowchart LR
Files["ARW, NEF, and rendered files"] --> Parser["RawParserKit\ndecode + capture metadata"]
Parser --> Host["RawCull adapters\nsource and cache policy"]
Host --> Analysis["PhotoAnalysisKit\nsharpness + focus evidence"]
Host --> AI["PhotoAIKit\nimage/text embeddings + segmentation"]
Analysis --> Host
AI --> Host
Host --> Core["RawCullCore\nburst grouping + ranking"]
Core --> App["RawCull UI, persistence, and culling actions"]The arrows are runtime data flow, not package dependencies. The four sibling packages do not depend on one another; the RawCull application imports and adapts them.
| Package | Owns | Deliberately leaves to RawCull |
|---|---|---|
| PhotoAIKit | Model validation, CLIP image and text embeddings, image/text semantic comparison, SAM 3, Vision similarity artifacts, AI workflows, and optional storage codecs | Model installation, RAW decoding, query and result presentation, cache locations, and culling policy |
| PhotoAnalysisKit | Sharpness scoring, saliency and classification, focus evidence and masks, calibration, and Vision feature prints | File decoding, source identity, persistence, settings wording, and culling decisions |
| RawCullCore | Package-safe metadata, capture-time and exposure-aware burst grouping, evidence-based ranking, focus-point normalization, and luminance histograms | RAW parsing, image analysis, application state, storage, and presentation |
| RawParserKit | Vendor dispatch, MakerNote and embedded-JPEG parsing, image loading, orientation, structured capture/EXIF extraction, and bounded decode work | Analysis, scoring, catalogs, cache policy, and UI |
The source for this section is the current PhotoAIKit, PhotoAnalysisKit,
RawCullCore, RawParserKit, and RawCull repositories under
/Users/thomas/GitHub/RawCull. In each package guide, paths beginning with
Sources/ and Tests/ are relative to that package. Paths beginning with
RawCull/ are relative to the RawCull application repository.
A detailed guide to PhotoAIKit’s contracts, CLIP image and text inference, semantic comparison, SAM 3, workflows, storage, concurrency, and model identity.
A detailed guide to PhotoAnalysisKit’s image-analysis boundary, sharpness pipeline, focus evidence, masks, calibration, batching, feature prints, resources, and concurrency.
A detailed guide to RawCullCore’s package-safe models, capture-time and EV-aware burst grouping, ranking evidence, confidence rules, histograms, concurrency, and tests.
A detailed guide to RawParserKit’s vendor dispatch, TIFF and MakerNote parsing, embedded previews, structured capture and exposure metadata, orientation, decode limiting, cancellation, compatibility APIs, and tests.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.