Skip to content

Repository files navigation

ImageCatalog

Build License JDK Powered by Mnemosyne Website Wiki

This is a RADiX application on Mnemosyne 1.11.0 that uses Apache Solr 10, Apache Tika and PaddleOCR via RapidOCR (Apache 2.0 ONNX; detect then recognize) to ingest tens of millions of files (images, but it can be extended) in place, extract MIME/EXIF with Tika, and OCR them into Solr. HuggingFace TrOCR and Donut remain as --model options.

OPSUI is the Vue 3 console from Mnemosyne, overlaid at /opsui/. Solr runs as its own process (not a Tomcat war) with two cores: imagecat (OCR text) and oodt-fm (File Manager catalog).

ImageSpace is the analyst desktop in this same tarball: search OCR and Tika fields, browse the image grid, CLIP similar, foreground / background similar (U2-Net / rembg), and Lens (a tiny Keras head fitted at Refine time on CLIP vectors; save by name and apply later). Saved thumbs sit in a tray; hover (or tap) the × to drop one. bin/imagecat start brings it up on port 8090 the way it starts Solr — FastAPI, not a WAR. bin/imagecat index <dir> [dir...] copies JPGs (nested paths kept), then OCR / Jaccard / CLIP / fg/bg. bin/imagecat reset empties the catalog; lenses stay, and the images themselves are never touched because they are indexed where they live unless --lenses. CLIP / fg / bg indexes live under $IMAGECAT_HOME/data/imagespace/. This is new work inspired by NASA JPL's efforts on the DARPA MEMEX program.

See docs/WHAT-IS-IN.md for keep / throw / replace and docs/roadmap.md for where we are and what is next.

Build

JDK 21, Maven 3.9+, Python 3.10+. Mnemosyne 1.11.0 must be in the local Maven repo (mvn install from a Mnemosyne checkout) or on Maven Central.

mvn -B package
tar xzf distribution/target/oodt-distribution-0.1-bin.tar.gz
cd <unpacked>
export IMAGECAT_HOME=$PWD
bin/imagecat setup          # .venv (OCR, CLIP, Keras Lens) + Vue build
bin/imagecat start          # File Manager, Workflow, Resource, Tomcat 9, Solr 10, ImageSpace
bin/imagecat index /path/to/jpgs [/more/dirs...]
  • OPSUI: http://localhost:8080/opsui/
  • ImageSpace: http://127.0.0.1:8090/
  • Solr OCR core: http://localhost:8983/solr/imagecat
  • Solr FM catalog: http://localhost:8983/solr/oodt-fm

OCR

The IngestInPlace PGE calls imagecat-ocr.py over each chunk file. --model paddle (default) is PP-OCR detect-then-recognize: no text boxes means empty ocr_text, not a hallucinated receipt word. --model trocr is a printed line recognizer; --model donut is document understanding and also fills caption. ocr_text is Solr field type text_ocr (WordDelimiter, preserve original) so a URL overlay like emmejihad.wordpress.com is searchable as wordpress. Tika runs on each image in that same script (MIME, EXIF, IPTC) so the imagecat Solr core has the metadata Solr Cell used to attach. Tesseract and Solr Cell are gone. The old solrcell_ingest name remains as a shim onto the same script.

python3 pge/bin/imagecat-ocr/imagecat-ocr.py \
  -f data/archive/chunks/0/filelist_chunk_0.txt \
  -s http://localhost:8983/solr/imagecat \
  --model paddle

ImageSpace

After OCR, the same ingest workflow scores Tika metadata Jaccard (urn:imagecat:IndexMetadataJaccard), then CLIP/FAISS (urn:imagecat:IndexImageSpace) and foreground/background CLIP (urn:imagecat:IndexImageSpaceFgBg). The UI at http://127.0.0.1:8090/ searches Solr (ocr_text, caption, copy-field text), shows the pictures, and runs Similar / FG / BG / Keys / Vals against those indexes. A Lens is not a pretrained model: mark tiles + / − and Refine fits a small Keras head (Torch backend) on the CLIP vectors you already have. Save as… keeps that head on disk; Apply scores the current catalog with it.

bin/imagecat setup installs Keras with the rest of the Python env and builds the Vue UI. Vite on 5173 is optional for UI development.

Visit the site: chrismattmann.github.io/imagecat.

See the wiki for more on installing and running ImageCat:

You can clone the wiki by running git clone https://github.com/chrismattmann/imagecat.wiki.git

Questions, comments?

Send them to Chris A. Mattmann.

License

Apache License, version 2

About

RADiX overlay on Mnemosyne 1.11.0: Apache Solr 10, Apache Tika, Paddle/RapidOCR (TrOCR/Donut optional). Ingest in place, MIME/EXIF + OCR into Solr. Vue OPSUI at /opsui/. ImageSpace (search, CLIP similar, fg/bg, Lens) on :8090.

Topics

Resources

Stars

95 stars

Watchers

14 watching

Forks

Releases

Packages

Used by

Contributors

Languages