跳到正文
DEV Community· Noor Ul Huda·· 3 小時前AI 評分34

MediaMend:Hacktoberfest 開源 AI 挑戰第 3 週參賽作品

MediaMind _ hf26challenge

AI 導讀

MediaMend 是一款在本機運作的 AI 助理,用來標記模糊相片、黑畫面影片、無聲錄音、空檔案及重複檔案,供用戶逐項檢查。獲批檔案會移至回收區而非直接刪除,用戶可還原、封存或永久刪除;永久刪除須另行確認。工具以 OpenCV、FFmpeg 和 SHA-256 進行檢測,並使用本機視覺語言模型判斷標記相片是否值得保留。

正文

Noor Ul Huda

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Demo

Code

How I Built It

Why Does Open Innovation Matter?

My Agent Session

The Lazy Payoff

Prize Categories

<!-- Thanks for participating! -->This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

MediaMend is a local AI assistant for people who record far more media than they will ever review: blurry photos, black video frames, silent recordings, empty files, duplicates.

The lazy way to clean that up is "delete everything below a threshold", and that is also the way to lose the one blurry, unrepeatable shot that mattered. MediaMend takes a safer lazy path:

  1. Scan a folder. Everything runs on your computer. Nothing is uploaded.
  2. Review a short queue of flagged files, each with a reason and a confidence level.
  3. Move to Bin. Approved files leave your folders but are not deleted.
  4. Restore, Archive or Delete permanently from the Bin. Permanent deletion needs a separate confirmation.

You never inspect the whole folder. You only judge the cases the tool is unsure about.

Code

https://github.com/noorulhuda07/mediamend

How I Built It

  • Deterministic checks for measurable problems: OpenCV Laplacian variance for blur, resolution checks, sampled video frames for blank-frame share, FFmpeg decoding for silence measured relative to each recording's own level, SHA-256 for exact duplicates.
  • A local open-weight vision-language model for judgment: [model name and tag, e.g. via Ollama] looks at flagged photos and answers one narrow question: could this imperfect image still be worth keeping? It returns structured JSON that I validate. If the model is unavailable or answers badly, the app says so instead of faking a result.
  • A safety layer: every move records the original path, size and SHA-256 in a manifest and verifies the checksum afterwards. Restore never overwrites an existing file, and nothing outside the scanned folder can be touched.
  • Stack: Python, Streamlit, OpenCV, FFmpeg, [Ollama + model].

Technical measurements and AI opinions are stored separately, so a model's guess never overwrites measured evidence.

Results

I tested on [N] labelled files ([N] photos, [N] videos, [N] audio, [N] other). Ground truth was labelled before scanning.

Metric Result
Blur precision / recall [x/y], [x/y]
False positives on must-keep files (rules only) [n]
False positives on must-keep files (rules + AI) [n]
Bin/restore checksum success [x/y]
Scan time ([N] files) [seconds]
AI time per photo [seconds] on [hardware]

Where it failed: [real examples, e.g. a dark but valid photo flagged as blurry because low contrast lowers the sharpness score; the model's wrong call on ...]. The thresholds are starting points I tuned on this set, not universal values.

Why Open Innovation Matters

  • Privacy: personal photos and voice recordings never leave the machine.
  • Control: I can swap or compare models ([model A] vs [model B]) and inspect the exact prompt and outputs.
  • Cost: no per-image API fees for scanning thousands of files.
  • Transparency and reproducibility: the code, prompt, thresholds and test set are public, so anyone can rerun the benchmark and see the failures.

The honest trade-off: [hardware needs, model speed on your laptop, accuracy limits].

Limitations

AI cannot judge creative value perfectly. Deleting from the Bin may not securely erase every copy on SSDs, backups or synced folders. [Anything else you observed.]

devchallenge #hf26challenge

來源:DEV Community · dev.to