Commit Graph

18 Commits

Author SHA1 Message Date
cb21b73460 [0.0.11] Segmentation phases 1-2: Mask2Former exported to ONNX, and modules/Segment to run it
- segmentation-plan.html: the plan for panoptic segmentation of images, per library folder, stored
  in .mcap chunks (no file version bump), in six phases.
- tools/export_mask2former.py: exports facebook/mask2former-swin-base-coco-panoptic to ONNX (opset 17,
  dynamic batch, 384 x 384 input) and checks it against PyTorch: on 25 images, all 180 segments
  identical (IoU 1.000). Writes the class list with names for people ("sky-other-merged" is "sky"),
  and PyTorch's own segmentations for segment-probe -check.
- modules/Segment: runs the model with onnxruntime (CUDA, else the CPU) and makes segments of its
  outputs as transformers' post_process_panoptic_segmentation does: a segment id map (longest side at
  most 1024) and each segment's class, score, area and bounds. Matches PyTorch on 99.8% of pixels,
  every segment scored 0.6 or more found. 57 ms an image at batch 4 on an RTX 5080 laptop.
- tools/segment_probe.jai (jai first.jai - segment_probe): segments image files; -out draws them,
  -check compares with PyTorch, -dump-input writes the model's input.
- modules/onnxruntime: ort_run_float_outputs, for a model with several outputs.
- first.jai copies the model to bin/segment-models. The model itself is not in git
  (modules/Segment/models, 462 MB); tools/export_mask2former.py makes it.
2026-10-10 03:39:28 +01:00
775c2873e4 [0.0.10] Shutdown: say what it is waiting on, stop OCR mid-batch, no race with the frame loop
- The exit overlay says which step of shutdown is running and what it waits on ("Stopping the OCR
  scan: finishing the text lines it is reading.", the import, the viewer, the models), and how long
  that step has taken once it passes 2 s. It said "Saving..." for all of it.
- OCR stops mid-batch: ocr_process takes a cancel flag (Ocr_Engine.cancel), checked by its workers
  before each piece of work; a scan sets it to its own cancel. A cut-short batch stores nothing and
  counts no failures. Closing during a scan took minutes when a batch held large images; now well
  under a second.
- Once shutdown starts, the main thread stops running the app's frames (the viewer, search, import,
  OCR, Stats) and draws only the overlay: background_frame read the search thread group while the
  shutdown thread was tearing it down, an access violation on exit.
2026-10-09 23:37:35 +01:00
baa188b0e4 [0.0.9] Import: videos and animated GIFs, in .mcap version 4
- Import brings in videos (MP4, MOV, MKV, WebM, AVI, WMV, MPEG, MTS/M2TS, FLV) on Windows, read with
  FFmpeg: the file as it was in the original, a frame a tenth of the way in (at most 3 s), turned
  the right way up, as the rendered image (what the grid, Capture window, OCR and labels see), and
  import.json with Duration, FrameRate, VideoCodec, Rotation, PosterTime, Audio, and the camera,
  date and location from the container. Elsewhere videos are skipped as "video (Windows only)".
- .mcap version 4: the original's size is a u64, so a video can be any size. Versions 1-3 still read.
  mcap_read_without_original and mcap_write_streamed read and rewrite a file with its original left
  on disk; mcap_store, mcap_erase, the import index and the import itself never hold a video in memory.
- Animated GIFs: Frames and Duration in import.json (gif_info).
- Grid: a play mark and duration on video thumbnails, GIF on animations. Capture window: what the
  video is, and Play in the default player (written out to %TEMP%\mcap).
- modules/ffmpeg: FFmpeg 6.0 bindings and the five DLLs used (avformat, avcodec, avutil, swscale,
  swresample), copied beside the executable by the build.
  swscale converts into a buffer of its own allocator with padded rows: an exact-sized one let
  its SIMD write past the end, crashing on frames of odd widths (1916, 1106 ...).
- image-probe shows videos and GIF frame counts; ocr-bench reads a video's frame.
- Tests: new video formats, display-matrix rotation, ISO 6709, video dates, GIF frames, and v4
  serialize/parse, v3 compatibility, streamed writes, store/erase and extraction.

SnagitConverter's copy of Capture_File needs syncing to read version 4 files.
2026-10-09 23:10:55 +01:00
811c096dd0 [0.0.8] Import: any folder of screenshots and photos into the library, a folder for each source
- Import window (and -import SOURCE DEST): every image under a folder (PNG, JPEG, HEIC, AVIF, WebP,
  GIF, BMP, TIFF, camera RAW) becomes an .mcap holding the file as it was, a preview turned by its
  EXIF orientation, and metadata.json and import.json Capture Text (date from EXIF, the file name or
  its time; file name as title; camera as app). .snagx files become the same .mcap SnagitConverter
  makes. Duplicates across the whole library are skipped by a hash index (.import-index); videos
  and sidecars are skipped; source files are only read.
- modules/Image_Decode: stb_image, then WIC for everything else; EXIF; orientation; previews.
  tools/image_probe.jai shows what it reads.
- modules/Snagx (and modules/jaison), copied from SnagitConverter.
- The library is a folder of folders: recursive scan, a folder filter, and a folder: search prefix.
- OCR, the viewer and ocr-bench decode any image format, turned the right way up.
- Rename D:\SnagitIndex to D:\McapIndex.
2026-10-09 08:15:12 +01:00
c333d95da7 [0.0.7] README: how to use mcap, and the search bar 2026-10-08 13:21:14 +01:00
bedeaebe41 [0.0.6] Erase OCR readings, or labels and vectors, from the whole library (for testing) 2026-10-08 11:47:30 +01:00
cf60dfa535 [0.0.5] Labels: SigLIP 2 labels and image vectors in .mcap version 3 chunks; label: and like: search 2026-10-08 11:37:21 +01:00
3c6da5b53d [0.0.4] Search and Stats on background threads, so typing never stalls the UI 2026-10-08 10:23:15 +01:00
8c9870ac01 [0.0.3] Viewer: delete a capture from its thumbnail, to the Recycle Bin or permanently after overwriting it 2026-10-08 10:11:08 +01:00
fac42e3462 [0.0.2] OCR: run each CUDA engine once when it is made, as cuBLASLt 13.8 crashed after an engine destroyed unused 2026-10-08 00:22:12 +01:00
a254e7a3dc [0.0.1] Viewer: a Refresh button, for captures deleted or added on disk 2026-10-07 23:42:08 +01:00
cf3a745588 [0.0.0] Statistics window: what OCR found in the captures shown; elapsed time for scans 2026-10-07 23:34:26 +01:00
962f0d7515 [0.0.0] Viewer: an OCR button beside the search, as the OCR window only opened itself when CUDA was missing 2026-10-07 22:32:42 +01:00
e2334e8be5 [0.0.0] OCR on the GPU: measured defaults for memory and batching; scan progress bars 2026-10-07 22:27:29 +01:00
ea9f055abc [0.0.0] .mcap version 2: OCR stored in each capture, search, a library scan, sorting by date; turned text 2026-10-07 21:51:18 +01:00
bb94f03b94 [0.0.0] OCR: an onnxruntime module and an OCR module, PP-OCRv5 mobile and server, on the GPU through CUDA when it can 2026-10-07 20:45:05 +01:00
94d56f25b1 [0.0.0] Capture window: a zoom slider, and fitting to the window, its width or its height 2026-10-07 12:03:54 +01:00
4323831801 [0.0.0] Capture viewer: a grid of every .mcap's preview, and one capture at full size in a window of its own 2026-10-07 11:41:38 +01:00