OpenScrub 1.0.76__tar.gz → 1.0.77__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenScrub
3
- Version: 1.0.76
3
+ Version: 1.0.77
4
4
  Summary: Local, GPU-accelerated redaction for video and screen recordings — blur, black-box, or mosaic faces, names, and any regex-matchable PII, with human review.
5
5
  Project-URL: Homepage, https://github.com/austinmabry/OpenScrub
6
6
  Project-URL: Repository, https://github.com/austinmabry/OpenScrub
@@ -261,6 +261,17 @@ rather than a half-second late. Defaults are tuned for the hardest case —
261
261
  dense, scrolling records screens (medical, financial, CRM, support
262
262
  consoles) — but the engine is general-purpose.
263
263
 
264
+ <p align="center">
265
+ <picture>
266
+ <source srcset="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/redaction-demo.webp" type="image/webp">
267
+ <img src="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/redaction-demo.gif"
268
+ alt="Split-screen wipe: a skier carving down a slope, one side redacted by OpenScrub with a body-shaped silhouette blur that tracks them through the turn while the snow, skis and poles stay sharp"
269
+ width="900">
270
+ </picture>
271
+ </p>
272
+ <p align="center"><em>Real output. The wipe reveals the same frames redacted and untouched: the silhouette mask tracks the skier through a fast carve, and only the body is covered — the mountain stays sharp.<br>
273
+ <sub>Compressed for GitHub — OpenScrub itself renders at full source quality and resolution (see <a href="https://openscrub.app">openscrub.app</a>). Footage: <a href="https://www.pexels.com/video/15155922/">Pexels</a>.</sub></em></p>
274
+
264
275
  <p align="center">
265
276
  <img src="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/editor-demo.gif"
266
277
  alt="OpenScrub editor in action: a video loaded on the timeline with stackable detection windows, per-window categories and zones, and audio-track lanes"
@@ -27,6 +27,17 @@ rather than a half-second late. Defaults are tuned for the hardest case —
27
27
  dense, scrolling records screens (medical, financial, CRM, support
28
28
  consoles) — but the engine is general-purpose.
29
29
 
30
+ <p align="center">
31
+ <picture>
32
+ <source srcset="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/redaction-demo.webp" type="image/webp">
33
+ <img src="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/redaction-demo.gif"
34
+ alt="Split-screen wipe: a skier carving down a slope, one side redacted by OpenScrub with a body-shaped silhouette blur that tracks them through the turn while the snow, skis and poles stay sharp"
35
+ width="900">
36
+ </picture>
37
+ </p>
38
+ <p align="center"><em>Real output. The wipe reveals the same frames redacted and untouched: the silhouette mask tracks the skier through a fast carve, and only the body is covered — the mountain stays sharp.<br>
39
+ <sub>Compressed for GitHub — OpenScrub itself renders at full source quality and resolution (see <a href="https://openscrub.app">openscrub.app</a>). Footage: <a href="https://www.pexels.com/video/15155922/">Pexels</a>.</sub></em></p>
40
+
30
41
  <p align="center">
31
42
  <img src="https://raw.githubusercontent.com/austinmabry/OpenScrub/main/assets/screenshots/editor-demo.gif"
32
43
  alt="OpenScrub editor in action: a video loaded on the timeline with stackable detection windows, per-window categories and zones, and audio-track lanes"
@@ -36,7 +36,7 @@ from dataclasses import dataclass, asdict
36
36
  import cv2
37
37
  import numpy as np
38
38
 
39
- VERSION = "1.0.76"
39
+ VERSION = "1.0.77"
40
40
 
41
41
  # ----------------------------------------------------------------------------
42
42
  # OCR backends
@@ -2420,9 +2420,17 @@ async function removeCerts(){
2420
2420
  async function updCheck(){
2421
2421
  try{
2422
2422
  const d=await (await fetch("/api/update_check")).json();
2423
- if(d.available)document.getElementById("upd").innerHTML=
2424
- '· <a href="#" style="color:#fbbf24" onclick="updRun();return false">v'
2425
- +d.latest+' available — update</a> ';
2423
+ if(!d.available)return;
2424
+ const el=document.getElementById("upd");
2425
+ if(d.can_update===false){
2426
+ // Docker/Podman: the in-place updater would write into the ephemeral
2427
+ // container and be lost on recreate — inform only, never offer.
2428
+ el.innerHTML='· <span style="color:#fbbf24" title="Pull the new image tag and recreate the container — job data lives in the mounted volume and is preserved.">v'
2429
+ +d.latest+' available — pull the new image to update</span> ';
2430
+ }else{
2431
+ el.innerHTML='· <a href="#" style="color:#fbbf24" onclick="updRun();return false">v'
2432
+ +d.latest+' available — update</a> ';
2433
+ }
2426
2434
  }catch(e){}
2427
2435
  }
2428
2436
  async function updRun(){
@@ -2546,11 +2554,21 @@ UPD = {"running": False, "log": [], "ok": None, "cache": (0.0, None)}
2546
2554
  UPD_LOCK = threading.Lock()
2547
2555
 
2548
2556
 
2557
+ def _in_container():
2558
+ """True inside Docker/Podman. The in-place updater writes into the
2559
+ container's ephemeral filesystem — the "update" would vanish on the
2560
+ next recreate while the UI claimed success. Containers update by
2561
+ pulling the new image, so the web UI must inform, never offer."""
2562
+ return (os.environ.get("OPENSCRUB_IN_DOCKER", "") not in ("", "0")
2563
+ or os.path.exists("/.dockerenv")
2564
+ or os.path.exists("/run/.containerenv"))
2565
+
2566
+
2549
2567
  @app.route("/api/update_check")
2550
2568
  def update_check():
2551
2569
  if openscrub_update is None:
2552
2570
  return jsonify({"current": openscrub.VERSION, "latest": None,
2553
- "available": False})
2571
+ "available": False, "can_update": False})
2554
2572
  now = time.time()
2555
2573
  with UPD_LOCK:
2556
2574
  ts, latest = UPD["cache"]
@@ -2564,11 +2582,16 @@ def update_check():
2564
2582
  openscrub.VERSION))
2565
2583
  return jsonify({"current": openscrub.VERSION,
2566
2584
  "latest": latest["version"] if latest else None,
2567
- "available": avail})
2585
+ "available": avail,
2586
+ "can_update": not _in_container()})
2568
2587
 
2569
2588
 
2570
2589
  @app.route("/api/update_run", methods=["POST"])
2571
2590
  def update_run():
2591
+ if _in_container():
2592
+ abort(400, "running in a container — update by pulling the new "
2593
+ "image and recreating the container (job data lives in "
2594
+ "the mounted volume and is preserved)")
2572
2595
  if openscrub_update is None:
2573
2596
  abort(400, "updater module not available")
2574
2597
  with JOBS_LOCK:
@@ -2280,6 +2280,31 @@ def test_docker_prefetch_matches_engine_pins():
2280
2280
  assert pf.MODELS == expect
2281
2281
 
2282
2282
 
2283
+ def test_container_update_notice_is_inform_only(monkeypatch):
2284
+ """Inside Docker the in-place updater writes into the ephemeral
2285
+ container filesystem — the "update" would vanish on the next recreate
2286
+ while the UI claimed success (a real CUDA-image user saw the footer
2287
+ offer an update it could not deliver). In a container the API must
2288
+ say can_update=false (footer shows "pull the new image") and
2289
+ update_run must refuse with the pull instruction."""
2290
+ import openscrub_web
2291
+ monkeypatch.setenv("OPENSCRUB_IN_DOCKER", "1")
2292
+ assert openscrub_web._in_container() is True
2293
+ client = openscrub_web.app.test_client()
2294
+ d = client.get("/api/update_check").get_json()
2295
+ assert d["can_update"] is False
2296
+ r = client.post("/api/update_run")
2297
+ assert r.status_code == 400
2298
+ assert b"pulling the new image" in r.data
2299
+ # env cleared -> the env-var gate no longer forces container mode
2300
+ monkeypatch.delenv("OPENSCRUB_IN_DOCKER", raising=False)
2301
+ import os as _os
2302
+ if not (_os.path.exists("/.dockerenv")
2303
+ or _os.path.exists("/run/.containerenv")):
2304
+ assert openscrub_web._in_container() is False
2305
+ assert client.get("/api/update_check").get_json()["can_update"] is True
2306
+
2307
+
2283
2308
  def test_quality_tiers_align_with_registries():
2284
2309
  """Every model id a Detection-quality tier selects must exist in its
2285
2310
  registry with a real download_url — a tier pointing at a missing or
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes