Back to seenX
In development
Learning

From Python to Rust

Learn the concepts, test a proof of concept, then implement proven behavior.

Learning plan · experiments pending

1. Inspect ten images

Use your own selected images in an ignored practice folder. Set up an isolated Python environment, load supported files, display thumbnails, and handle unreadable inputs. Explain what paths and pixel arrays represent before adding a model.

2. Understand embeddings

Use one pretrained model with compatible image and text encoders. Inspect preprocessing, vector shapes, normalization, and cosine similarity. Show the top five images for a description. A similarity score is not a confidence percentage.

3. Evaluate before expanding

Label acceptable results for 10–15 queries before inspecting rankings. Expand to 50–200 images. Record top-five hit rate, indexing time, warm query latency, device, dependencies, and exact model revision. Rerun offline after downloads.

4. Add OCR and metadata

Compare exact-text retrieval with visual retrieval and their combination. Keep capture date separate from file timestamps. Test strict filters and preserve unknown values.

5. Test relationships

Try a small ontology only after a baseline exists. Compare receipt-by-trip queries with and without relationships. Keep model proposals, user confirmations, and source metadata distinguishable.

6. Port the behavior

Rust is the production target without a required Python runtime. Port small slices using the same evaluation inputs, preprocessing, and model revision. Compare numeric outputs with documented tolerances. Models may run through native libraries called from Rust.

7. Add interfaces later

A Rust CLI can expose a working engine before SwiftUI. Agent adapters follow real retrieval. Python remains useful for learning, evaluation, and future experiments.

Open the step-by-step learning notes →