WABS - v1.0.1
Full Changelog: v1.0.0...v1.0.1
WABS v1.0.1 Release Notes
We are excited to announce the release of WABS v1.0.1! This release focuses on massive performance optimizations (specifically memory management and lazy loading), critical bug fixes, improved scanning accuracy, robust temporary folder handling on Windows/Linux, and database cleanup routines.
⚡ Performance & Caching
- Compiled ImageNet Mapping: Converted ImageNet class mapping from external JSON to a compiled Python static dictionary (
imagenet_mapping_data.py), loading instantly via Python bytecode (.pyc) to bypass disk reading and JSON string parsing at runtime. - On-Demand Lazy Loading & Module Release: Machine learning models (ONNX models for face, object, and OCR detection) and heavy libraries (like
onnxruntimeandrapidocr_onnxruntime) are now loaded strictly on-demand. When the application goes idle, a memory release routine automatically unloads them and triggers garbage collection (gc.collect()) and dynamic heap trimming (malloc_trim) to free system RAM. - OpenCL DNN Backend Fallback Disabled: Removed OpenCV OpenCL DNN backend fallback due to lockups/freezes caused by dynamic OpenCL convolution kernel compilations, defaulting back to CPU (CUDA remains active for NVIDIA GPUs).
- Face Scanner Optimization: Skipped face scans on very small images and icons (dimensions
< 100px) to prevent false-positives and accelerate scan speeds. - Unified Pipeline Reuse: Redundant database/YuNet scans are avoided by reusing cached face records, and each file is decoded exactly once per scan step across face, object, and OCR pipelines.
- Extended Memory Controls: Added 15 minutes and 2 hours idle memory release timeouts in Settings.
- Added lightning-fast in-memory face exemplar curation: Optimized scanner loops to eliminate CPU bottlenecks, and refined default profile thumbnails using centroid face matching.
🐞 Bug Fixes & Refinements
- Name-Based Preference Persistence: Favorite (pinned) and hidden profiles are now persisted by name (or ID for unknown profiles) in user preferences, resolving issues where pinned profiles were lost or mismatched after re-indexing or importing Known/Names people.
- Face-Aware Animal Thresholding: Elevated classification thresholds for animal/pet categories (e.g.,
dog,cat) to a strict minimum of0.45if a human face is present in the image, eliminating false-positive animal tags on family photos. - Improved Object Classification Accuracy:
- Implemented probability aggregation (e.g., summing subclasses like dog breeds to
dog,animal, andpet). - Added a 1.5% subclass noise floor threshold to suppress false-positives on screenshots/documents.
- Retained specific tags (e.g.,
object:golden_retriever) alongside high-level tags when confidence exceeds sensitivity thresholds.
- Implemented probability aggregation (e.g., summing subclasses like dog breeds to
- Transparent Image Compositing: Added transparent-to-white background compositing for PNG/GIF/WebP files, preventing transparent icons from being misclassified by the object scanner (e.g., classifying a transparent hexagon as a "spatula").
- Aspect Ratio-Preserving Letterboxing: Resizes objects to a white 224x224 canvas to improve classification accuracy on non-square photos.
- System Tray & Shutdown Fixes:
- Silenced cosmetic Uvicorn shutdown exceptions (
KeyboardInterruptandasyncio.CancelledError). - Suppressed
pystrayicon docking tracebacks on Linux/Ubuntu during shutdown. - Tied system tray icon termination to the Web UI shutdown endpoint (
/shutdown) to prevent terminal hangs.
- Silenced cosmetic Uvicorn shutdown exceptions (
- Other Fixes: Resolved an
UnboundLocalErrorfor OCR during transparent image metadata passes, added timestamps to verbose console logs, and implemented uncropped source photo fallback for person cover profiles if models are missing.
🛡️ Safety & System Cleanliness
- PyInstaller Temp Folder Locking (Windows): Locks static assets in the temporary extraction folder (
_MEIPASS) by keeping read-only file descriptors open during process execution. This prevents Windows from allowing manual deletions or system disk cleanups while the application is running, while still allowing clean folder deletion on process exit. - Dynamic Model Health Checks: Checks for required AI models during status polls and displays a warning banner at the top of the React UI if any are missing. Checks are also run prior to starting scans, returning a clean HTTP 400 instead of failing silently in background threads.
- Atomic Directory Renaming on Exit: Replaced legacy lockfiles with an atomic folder-renaming strategy on shutdown (renaming
_MEIxxxxxto_MEIxxxxx_to_deletefirst to ensure DLL locks are checked before deletion). - Orphaned DLL Temp Folder Purger: Added a startup routine to scan and purge legacy
_MEItemp folders containing only C-runtime DLLs (msvcp140.dll, etc.), safely reclaiming disk space without affecting other active applications. - Strict Deletion Paths: Reinforced deletion constraints to ensure they are strictly subdirectories of the system's root temp directory.
🧹 Database Cleanup & Optimization
- Orphaned Records Purging: Enhanced the database cleanup routine to delete orphaned entries in
faces,processed_files,processed_objects,processed_text, andfile_text_ftstables that reference missing/deleted files. - Empty Profile & Cache Cleanup: Automatically deletes empty people profiles (zero face detections) and removes their cached thumbnail files (
person_{person_id}.jpg) from disk. - SQLite Database Vacuuming: Runs a SQLite
VACUUMon both the main database (archive.db) and the AI database (ai_metadata.db) at the end of the cleanup routine to reclaim physical disk space and optimize queries.