ShashwatGupta23 Cursor commited on
Commit
d4410cd
·
1 Parent(s): 5efd8ef

Add all 38 yolo26 prebackbone_samples as Gradio examples

Browse files

Bundle every *_input / *_reference pair from yolo26n_hripcb
prebackbone_samples and show 6 examples per page in the demo.

Co-authored-by: Cursor <cursoragent@cursor.com>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. app.py +2 -16
  2. examples/{Missing_hole_07_missing_hole_03_rot_idx004_reference.jpg → Missing_hole_04_missing_hole_19_rot_idx015_input.jpg} +2 -2
  3. examples/{Mouse_bite_05_mouse_bite_02_idx007_input.jpg → Missing_hole_04_missing_hole_19_rot_idx015_reference.jpg} +2 -2
  4. examples/{Mouse_bite_05_mouse_bite_02_idx007_reference.jpg → Missing_hole_05_missing_hole_04_rot_idx007_input.jpg} +2 -2
  5. examples/Missing_hole_05_missing_hole_04_rot_idx007_reference.jpg +3 -0
  6. examples/Missing_hole_08_missing_hole_01_idx006_input.jpg +3 -0
  7. examples/Missing_hole_08_missing_hole_01_idx006_reference.jpg +3 -0
  8. examples/{Missing_hole_07_missing_hole_03_rot_idx004_input.jpg → Mouse_bite_07_mouse_bite_03_idx003_input.jpg} +2 -2
  9. examples/{Short_06_short_11_rot_idx010_input.jpg → Mouse_bite_07_mouse_bite_03_idx003_reference.jpg} +2 -2
  10. examples/Mouse_bite_08_mouse_bite_10_rot_idx014_input.jpg +3 -0
  11. examples/Mouse_bite_08_mouse_bite_10_rot_idx014_reference.jpg +3 -0
  12. examples/Mouse_bite_09_mouse_bite_07_rot_idx005_input.jpg +3 -0
  13. examples/Mouse_bite_09_mouse_bite_07_rot_idx005_reference.jpg +3 -0
  14. examples/Mouse_bite_09_mouse_bite_08_idx007_input.jpg +3 -0
  15. examples/Mouse_bite_09_mouse_bite_08_idx007_reference.jpg +3 -0
  16. examples/Mouse_bite_11_mouse_bite_02_rot_idx011_input.jpg +3 -0
  17. examples/Mouse_bite_11_mouse_bite_02_rot_idx011_reference.jpg +3 -0
  18. examples/Mouse_bite_12_mouse_bite_06_idx004_input.jpg +3 -0
  19. examples/Mouse_bite_12_mouse_bite_06_idx004_reference.jpg +3 -0
  20. examples/{Short_06_short_11_rot_idx010_reference.jpg → Open_circuit_01_open_circuit_20_rot_idx012_input.jpg} +2 -2
  21. examples/Open_circuit_01_open_circuit_20_rot_idx012_reference.jpg +3 -0
  22. examples/Open_circuit_04_open_circuit_12_rot_idx004_input.jpg +3 -0
  23. examples/Open_circuit_04_open_circuit_12_rot_idx004_reference.jpg +3 -0
  24. examples/Open_circuit_04_open_circuit_13_idx001_input.jpg +3 -0
  25. examples/Open_circuit_04_open_circuit_13_idx001_reference.jpg +3 -0
  26. examples/Open_circuit_04_open_circuit_14_idx002_input.jpg +0 -3
  27. examples/Open_circuit_04_open_circuit_14_idx002_reference.jpg +0 -3
  28. examples/Open_circuit_04_open_circuit_17_rot_idx007_input.jpg +3 -0
  29. examples/Open_circuit_04_open_circuit_17_rot_idx007_reference.jpg +3 -0
  30. examples/Open_circuit_05_open_circuit_06_rot_idx002_input.jpg +3 -0
  31. examples/Open_circuit_05_open_circuit_06_rot_idx002_reference.jpg +3 -0
  32. examples/Open_circuit_08_open_circuit_05_rot_idx005_input.jpg +3 -0
  33. examples/Open_circuit_08_open_circuit_05_rot_idx005_reference.jpg +3 -0
  34. examples/Open_circuit_12_open_circuit_03_rot_idx006_input.jpg +3 -0
  35. examples/Open_circuit_12_open_circuit_03_rot_idx006_reference.jpg +3 -0
  36. examples/Short_01_short_02_rot_idx007_input.jpg +3 -0
  37. examples/Short_01_short_02_rot_idx007_reference.jpg +3 -0
  38. examples/Short_01_short_06_idx012_input.jpg +3 -0
  39. examples/Short_01_short_06_idx012_reference.jpg +3 -0
  40. examples/Short_04_short_11_idx011_input.jpg +3 -0
  41. examples/Short_04_short_11_idx011_reference.jpg +3 -0
  42. examples/Short_04_short_18_rot_idx002_input.jpg +3 -0
  43. examples/Short_04_short_18_rot_idx002_reference.jpg +3 -0
  44. examples/Short_06_short_08_rot_idx009_input.jpg +3 -0
  45. examples/Short_06_short_08_rot_idx009_reference.jpg +3 -0
  46. examples/Short_08_short_05_rot_idx012_input.jpg +3 -0
  47. examples/Short_08_short_05_rot_idx012_reference.jpg +3 -0
  48. examples/Short_09_short_01_rot_idx007_input.jpg +3 -0
  49. examples/Short_09_short_01_rot_idx007_reference.jpg +3 -0
  50. examples/Short_10_short_02_rot_idx012_input.jpg +3 -0
app.py CHANGED
@@ -66,26 +66,12 @@ def run_demo(defect_path: str | None, reference_path: str | None):
66
 
67
 
68
  def _example_pairs() -> list[list[str]]:
 
69
  pairs: list[list[str]] = []
70
  ex_dir = _ROOT / "examples"
71
  if not ex_dir.is_dir():
72
  return pairs
73
- preferred = [
74
- "Short_06_short_11_rot_idx010_input.jpg",
75
- "Open_circuit_04_open_circuit_14_idx002_input.jpg",
76
- "Mouse_bite_05_mouse_bite_02_idx007_input.jpg",
77
- "Missing_hole_07_missing_hole_03_rot_idx004_input.jpg",
78
- ]
79
- seen: set[str] = set()
80
- for name in preferred:
81
- inp = ex_dir / name
82
- ref = inp.with_name(name.replace("_input.", "_reference."))
83
- if inp.is_file() and ref.is_file():
84
- pairs.append([str(inp), str(ref)])
85
- seen.add(name)
86
  for inp in sorted(ex_dir.glob("*_input.jpg")):
87
- if inp.name in seen or len(pairs) >= 4:
88
- break
89
  ref = inp.with_name(inp.name.replace("_input.", "_reference."))
90
  if ref.is_file():
91
  pairs.append([str(inp), str(ref)])
@@ -114,7 +100,7 @@ def build_demo() -> gr.Interface:
114
  title=TITLE,
115
  description=DESCRIPTION.strip(),
116
  examples=_example_pairs() or None,
117
- examples_per_page=2,
118
  cache_examples=False,
119
  flagging_mode="never",
120
  theme=gr.themes.Soft(),
 
66
 
67
 
68
  def _example_pairs() -> list[list[str]]:
69
+ """All *_input / *_reference pairs bundled in examples/ (from yolo26 prebackbone_samples)."""
70
  pairs: list[list[str]] = []
71
  ex_dir = _ROOT / "examples"
72
  if not ex_dir.is_dir():
73
  return pairs
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  for inp in sorted(ex_dir.glob("*_input.jpg")):
 
 
75
  ref = inp.with_name(inp.name.replace("_input.", "_reference."))
76
  if ref.is_file():
77
  pairs.append([str(inp), str(ref)])
 
100
  title=TITLE,
101
  description=DESCRIPTION.strip(),
102
  examples=_example_pairs() or None,
103
+ examples_per_page=6,
104
  cache_examples=False,
105
  flagging_mode="never",
106
  theme=gr.themes.Soft(),
examples/{Missing_hole_07_missing_hole_03_rot_idx004_reference.jpg → Missing_hole_04_missing_hole_19_rot_idx015_input.jpg} RENAMED
File without changes
examples/{Mouse_bite_05_mouse_bite_02_idx007_input.jpg → Missing_hole_04_missing_hole_19_rot_idx015_reference.jpg} RENAMED
File without changes
examples/{Mouse_bite_05_mouse_bite_02_idx007_reference.jpg → Missing_hole_05_missing_hole_04_rot_idx007_input.jpg} RENAMED
File without changes
examples/Missing_hole_05_missing_hole_04_rot_idx007_reference.jpg ADDED

Git LFS Details

  • SHA256: b0d4e04008de2f50272ec86c3005a03f8429bf93e6e1b589c51d34546355c4a6
  • Pointer size: 131 Bytes
  • Size of remote file: 123 kB
examples/Missing_hole_08_missing_hole_01_idx006_input.jpg ADDED

Git LFS Details

  • SHA256: 7ed3b6dd4157b8da5f99d59458cb88b7437a6284b54f1e2b53b67e1f970bd25d
  • Pointer size: 131 Bytes
  • Size of remote file: 156 kB
examples/Missing_hole_08_missing_hole_01_idx006_reference.jpg ADDED

Git LFS Details

  • SHA256: d3c1468dc783488057d202d86288f7d6f25f8d370d6930f0c8dfca207f7ab21c
  • Pointer size: 131 Bytes
  • Size of remote file: 145 kB
examples/{Missing_hole_07_missing_hole_03_rot_idx004_input.jpg → Mouse_bite_07_mouse_bite_03_idx003_input.jpg} RENAMED
File without changes
examples/{Short_06_short_11_rot_idx010_input.jpg → Mouse_bite_07_mouse_bite_03_idx003_reference.jpg} RENAMED
File without changes
examples/Mouse_bite_08_mouse_bite_10_rot_idx014_input.jpg ADDED

Git LFS Details

  • SHA256: d7865bbfbe615e714c6f5403adb6906b2130f362cb3f0802df65495671c82acc
  • Pointer size: 131 Bytes
  • Size of remote file: 110 kB
examples/Mouse_bite_08_mouse_bite_10_rot_idx014_reference.jpg ADDED

Git LFS Details

  • SHA256: bb6ea886c3258015b2bc12b1ec829391627e1560140cbc339f21473445cc557e
  • Pointer size: 131 Bytes
  • Size of remote file: 127 kB
examples/Mouse_bite_09_mouse_bite_07_rot_idx005_input.jpg ADDED

Git LFS Details

  • SHA256: 9e6de4e8c08fe3b07473735db1c33f9ba9b7d1c79237d4e6b3e919b00734d67d
  • Pointer size: 131 Bytes
  • Size of remote file: 144 kB
examples/Mouse_bite_09_mouse_bite_07_rot_idx005_reference.jpg ADDED

Git LFS Details

  • SHA256: 2e9b2efce5abe47d1318046e46bf23409faa06bdf9c1e00b18661c0be7b13232
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
examples/Mouse_bite_09_mouse_bite_08_idx007_input.jpg ADDED

Git LFS Details

  • SHA256: 17c9a28f19816dcf22fd4f7d8ad034d20167b2e7b5a732e04faa186a5bd2cfb6
  • Pointer size: 131 Bytes
  • Size of remote file: 122 kB
examples/Mouse_bite_09_mouse_bite_08_idx007_reference.jpg ADDED

Git LFS Details

  • SHA256: f418d292d0d89f73c10712f8fbe4196edfe03c62caefee1b147e0bbf8bd77afa
  • Pointer size: 131 Bytes
  • Size of remote file: 114 kB
examples/Mouse_bite_11_mouse_bite_02_rot_idx011_input.jpg ADDED

Git LFS Details

  • SHA256: 14a806edd8cc0ac25f645b30000b278ad00f35809e69b4d357890fcca276db67
  • Pointer size: 131 Bytes
  • Size of remote file: 112 kB
examples/Mouse_bite_11_mouse_bite_02_rot_idx011_reference.jpg ADDED

Git LFS Details

  • SHA256: 091e8a905b5d3abd2a335fc350fe859d14e929a8a2461f133a0687edd759b299
  • Pointer size: 131 Bytes
  • Size of remote file: 100 kB
examples/Mouse_bite_12_mouse_bite_06_idx004_input.jpg ADDED

Git LFS Details

  • SHA256: e47386a0831b980542b74317ac5b26c1d76befb60cbadcf5d6973bcb68a4b2de
  • Pointer size: 131 Bytes
  • Size of remote file: 118 kB
examples/Mouse_bite_12_mouse_bite_06_idx004_reference.jpg ADDED

Git LFS Details

  • SHA256: 3ce44eadaab98ae101994a177fbf5eba33fc47c0241f932069a99325a5a4be3e
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
examples/{Short_06_short_11_rot_idx010_reference.jpg → Open_circuit_01_open_circuit_20_rot_idx012_input.jpg} RENAMED
File without changes
examples/Open_circuit_01_open_circuit_20_rot_idx012_reference.jpg ADDED

Git LFS Details

  • SHA256: ea563c4e34e123ef80c8048dca7d36be5abe97fbca9a71208b2b671413678d79
  • Pointer size: 130 Bytes
  • Size of remote file: 39.3 kB
examples/Open_circuit_04_open_circuit_12_rot_idx004_input.jpg ADDED

Git LFS Details

  • SHA256: 01cdbea653ec7a433c16ed58e117b6d6f8f28f94e9f41a0b3cb41218a291f345
  • Pointer size: 131 Bytes
  • Size of remote file: 133 kB
examples/Open_circuit_04_open_circuit_12_rot_idx004_reference.jpg ADDED

Git LFS Details

  • SHA256: 17825876d6b88153c5e8c628abd4ff9d851f7bedebf078fd75332fa6c8670ff6
  • Pointer size: 131 Bytes
  • Size of remote file: 123 kB
examples/Open_circuit_04_open_circuit_13_idx001_input.jpg ADDED

Git LFS Details

  • SHA256: ce5fb5747ce308387830813b7779a991c0782c2286e8390186c03167767e5a04
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
examples/Open_circuit_04_open_circuit_13_idx001_reference.jpg ADDED

Git LFS Details

  • SHA256: 0c940727154d958ac84ad5918fe0028288e2dabc283942f04808db6d1f20e50a
  • Pointer size: 131 Bytes
  • Size of remote file: 141 kB
examples/Open_circuit_04_open_circuit_14_idx002_input.jpg DELETED

Git LFS Details

  • SHA256: 245c1b713aef03f5114eead5398d5e5b63c1c2e3727a9a657ea6d0faa5049cab
  • Pointer size: 131 Bytes
  • Size of remote file: 112 kB
examples/Open_circuit_04_open_circuit_14_idx002_reference.jpg DELETED

Git LFS Details

  • SHA256: 60d74604a30ba79eab9c0f994f10bc6fd32f44cfc87b081630007be943237012
  • Pointer size: 131 Bytes
  • Size of remote file: 133 kB
examples/Open_circuit_04_open_circuit_17_rot_idx007_input.jpg ADDED

Git LFS Details

  • SHA256: aebbe9276537c99ef34dff2c58ab1b266070c586d0e707cf7bbb5a021e050b01
  • Pointer size: 131 Bytes
  • Size of remote file: 121 kB
examples/Open_circuit_04_open_circuit_17_rot_idx007_reference.jpg ADDED

Git LFS Details

  • SHA256: 216c7535d0f67e143e84f4e232b90fee3e29ec5f2ebce4208d5f75b95600e20a
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
examples/Open_circuit_05_open_circuit_06_rot_idx002_input.jpg ADDED

Git LFS Details

  • SHA256: 2eff2222df507919d46da845836d2f4323120e180224118d23802d961138f5e0
  • Pointer size: 131 Bytes
  • Size of remote file: 112 kB
examples/Open_circuit_05_open_circuit_06_rot_idx002_reference.jpg ADDED

Git LFS Details

  • SHA256: 6c3b64abe5d021dc45387d64d54ff197fb2b7c7884ebf50a5f66a94fa32a8934
  • Pointer size: 131 Bytes
  • Size of remote file: 128 kB
examples/Open_circuit_08_open_circuit_05_rot_idx005_input.jpg ADDED

Git LFS Details

  • SHA256: 961d05313abab9c2261ccac9fa92c516b85096096a3107f5bdd37fea02d57e37
  • Pointer size: 130 Bytes
  • Size of remote file: 89.7 kB
examples/Open_circuit_08_open_circuit_05_rot_idx005_reference.jpg ADDED

Git LFS Details

  • SHA256: ba45b29907c7e4a63a4136e6e27197573f1eeb6f5d40b4230c44f9755950f3f2
  • Pointer size: 130 Bytes
  • Size of remote file: 92.6 kB
examples/Open_circuit_12_open_circuit_03_rot_idx006_input.jpg ADDED

Git LFS Details

  • SHA256: d030501974b1ec74df2eb195cd64eeec7dc989f571e8b176626567a7f160a728
  • Pointer size: 130 Bytes
  • Size of remote file: 90.2 kB
examples/Open_circuit_12_open_circuit_03_rot_idx006_reference.jpg ADDED

Git LFS Details

  • SHA256: 432d0743b3627b85431c2629f720b12e3ed2871123477dfd664df297ec9f7dee
  • Pointer size: 130 Bytes
  • Size of remote file: 89.3 kB
examples/Short_01_short_02_rot_idx007_input.jpg ADDED

Git LFS Details

  • SHA256: 07e6960761d515db1f529b2ef014fd3fdf9bd58035902313c80d4124fb22bea2
  • Pointer size: 131 Bytes
  • Size of remote file: 106 kB
examples/Short_01_short_02_rot_idx007_reference.jpg ADDED

Git LFS Details

  • SHA256: a827a639f848514c1b38e4e94d6240a418603d7151002bd89ab7dd4977da5f07
  • Pointer size: 131 Bytes
  • Size of remote file: 103 kB
examples/Short_01_short_06_idx012_input.jpg ADDED

Git LFS Details

  • SHA256: b7c81a4620dbab6b3175c8cd93072a17bf49f90a42e5b8afbc3d4c0864a326eb
  • Pointer size: 130 Bytes
  • Size of remote file: 87.8 kB
examples/Short_01_short_06_idx012_reference.jpg ADDED

Git LFS Details

  • SHA256: 583a67b7557a6ea234021bc192b3eb3b7cc4e11d264a5bf1f35dc9c41c7790ca
  • Pointer size: 130 Bytes
  • Size of remote file: 99 kB
examples/Short_04_short_11_idx011_input.jpg ADDED

Git LFS Details

  • SHA256: ce864274158e0f8f5d1b966c7db3778d129abcf971fe0ef8403b7f4f230364ed
  • Pointer size: 131 Bytes
  • Size of remote file: 140 kB
examples/Short_04_short_11_idx011_reference.jpg ADDED

Git LFS Details

  • SHA256: 392f946a1a175b5ced0a0681987b2dc305a9c20cee5ae9cdbdd144a3a20cbac5
  • Pointer size: 131 Bytes
  • Size of remote file: 134 kB
examples/Short_04_short_18_rot_idx002_input.jpg ADDED

Git LFS Details

  • SHA256: e8f66e2be1c8a91ce48770001a4b34126d91a01a0c598708365c59b1536b1164
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
examples/Short_04_short_18_rot_idx002_reference.jpg ADDED

Git LFS Details

  • SHA256: bcc9d447c9eed6024201a090c0a8cbdc40e23f5b91c35e6a7145dea48e9599e2
  • Pointer size: 131 Bytes
  • Size of remote file: 138 kB
examples/Short_06_short_08_rot_idx009_input.jpg ADDED

Git LFS Details

  • SHA256: a48da6a6d92a137ebb9c74dccfc896a7391df51725b9fbbc92b7441b7c5db455
  • Pointer size: 131 Bytes
  • Size of remote file: 130 kB
examples/Short_06_short_08_rot_idx009_reference.jpg ADDED

Git LFS Details

  • SHA256: ce88962ff2bd9e0495f84b01fcf2a5cba26ab605e754aba7a61860f4f5f35b64
  • Pointer size: 131 Bytes
  • Size of remote file: 131 kB
examples/Short_08_short_05_rot_idx012_input.jpg ADDED

Git LFS Details

  • SHA256: 14f11043dc270d2d62aed398e4bd241196869c66499045361521ffa5900fb6f0
  • Pointer size: 130 Bytes
  • Size of remote file: 90.6 kB
examples/Short_08_short_05_rot_idx012_reference.jpg ADDED

Git LFS Details

  • SHA256: 2097896b84c3e9547ff29b1491c3d4d8d30a035187a021f1e3610a40c7f35113
  • Pointer size: 131 Bytes
  • Size of remote file: 111 kB
examples/Short_09_short_01_rot_idx007_input.jpg ADDED

Git LFS Details

  • SHA256: 2eb99287decab29b84653eb5c8523cc67e6f883b2a02cd881db08ad2e7c9b34f
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB
examples/Short_09_short_01_rot_idx007_reference.jpg ADDED

Git LFS Details

  • SHA256: 44f7ae887c9466ce839636f303912b09e86ebfb3e455a5264de06ad28194f34b
  • Pointer size: 131 Bytes
  • Size of remote file: 117 kB
examples/Short_10_short_02_rot_idx012_input.jpg ADDED

Git LFS Details

  • SHA256: 87d8c2c50ccdafc4ded4c8c7e3aedb56b746d3c288cbfc38f835d03b1d459cb0
  • Pointer size: 130 Bytes
  • Size of remote file: 89.6 kB