Skip to content

Finished website#1

Open
alexgaffen wants to merge 44 commits intoObayed-Elsayed:mainfrom
alexgaffen:main
Open

Finished website#1
alexgaffen wants to merge 44 commits intoObayed-Elsayed:mainfrom
alexgaffen:main

Conversation

@alexgaffen
Copy link
Copy Markdown

No description provided.

…sis completes

- Cache analysis results in _analysis_cache so CSV download reuses them
- Clear cache on new file uploads (both simple and chunked)
- Show fibrosis extent only after full analysis, not from preview
- For JPG/PNG/BMP, skip the /preview endpoint and go straight to /analyze
- Reduces backend load by running the fibrosis filter once instead of twice
- Images, extent, and classification now appear simultaneously for small files
- Frontend: rejects oversized flat images immediately with a clear error message
- Frontend: drop zone now shows file size limits for each format
- Backend: safety guard in analyze_single_file() prevents OOM crashes on oversized uploads
- Retrained FCM with K-Means initialization on 468-dim PCA features (fixed_model_params.pkl)
  All 4 clusters now well-separated (132-649 distance, FPC 0.8100)
- Added morphological opening (3x3 ellipse) to remove single-pixel noise from fibrosis mask
- Raised jump detection threshold (0.3->0.5%) for more conservative extent calculation
- Added brightness normalization (median->160) for consistent stain deconvolution
- Adaptive threshold via descending sweep with searchsorted optimization (O(n log n))
- White background excluded from extent denominator (tissue-only ratio)
- Per-patch VGG16 classification with worst-class voting (20% quorum)
- UI: FCM membership probability bars, right-aligned extent/classification
- UI: Disabled image dragging, added mask download button
- UI: Renamed CSV button to 'Download CSV Diagnosis'
- Extent value font reduced (2rem->1.5rem) for cleaner layout
…rease

- Del full_pil, full_mask_pil, preview_pil, img after np.array conversion
- Delete uploaded files from disk after processing (os.remove)
- Del tile_mask_pil/patch_pil per tile in finally block
- gc.collect() every 10 tiles + after freeing full arrays
- Remove thumb_pil creation (no longer needed)
- Remove worst-class voting, vote_breakdown, thumbnail fallback
- Average fuzzy memberships across patches, derive label from argmax
- Remove duplicate accumulator declarations
- Radar chart: fontSize 12->15 (pct), 9->12 (labels)
- Report labels: 0.75rem->0.85rem, spectrum text: 0.68rem->0.78rem
- Move pipeline label into top bar
- Add fixed_model_params_pca2.pkl
…nd UI polish

- Per-pixel area threshold adjustment via magnifier (ArrowLeft/Right)
- Accumulating delta with debounce for hold-to-adjust support
- Capture-phase key handler to prevent slider from stealing arrow keys
- Undo stack (Ctrl+Z) and area reset (Ctrl+R) with backend support
- Modified areas mini-map in diagnosis panel (fully opaque colors)
- Help overlay with keybinding reference (wider modal)
- Ctrl+Z/R binding indicators styled blue
- Confirmation overlay when baseline change would reset area edits
- Block file uploads during active diagnosis
- Cancel diagnosis button with page reload
- Hide 'click or drop to change' and disable hover highlight while busy
- Fibrosis extent bar and threshold slider track made brighter
- Adjusted ratio, area edits badge, and undo button in traffic light green
- Backend: rethreshold-area, reset-area, undo-area, delta-map routes
- New classify_from_mask() in nafld.py: runs VGG16+PCA+FCM on the user-refined mask
- For large/SVS images: tiles mask, ranks by severity, averages top-5 worst tiles
- New /classify-mask/<filename> endpoint in main.py
- Frontend: Diagnose button in right panel, radar chart after classification
- CSS: classify-prompt, classify-btn, classify-loading, reclassify-btn styles
- CSV: look up analysis cache by filename (file deleted after SVS processing)
- Classify scan: two-stage exclusion (>=50% white in original + <1% white in mask)
- SSE streaming for classify-mask endpoint with tile progress
- Pixel-accurate worst-patch red outlines using real coords
- Re-diagnose disabled until mask changes; Analyze Patch Results toggle
- Pass classification scores to CSV download when available
…l style, Perisinusoidal->Periportal, CSV requires full diagnosis
…inate space instead of comparing panel to image coordinates
…Q-key + excluded button when load-balanced to a different worker than the one that ran analyze)
…change 'Excluded' text to 'what was excluded?'
…green tissue during extent calc, black-slate + 1.5s random-pixel reveal on right panel, lens hidden if frame extends outside image, fix img vertical shift in magnifier mode (preview-image absolute), top medical-green slider replaces right-panel scrollbar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant