xttmp 2.3.0.8__tar.gz → 2.3.0.9__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.
Files changed (51) hide show
  1. {xttmp-2.3.0.8/src/xttmp.egg-info → xttmp-2.3.0.9}/PKG-INFO +1 -1
  2. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/pyproject.toml +1 -1
  3. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/stmdplus_core.py +11 -8
  4. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/vstmd_core.py +5 -0
  5. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/iostream.py +2 -0
  6. {xttmp-2.3.0.8 → xttmp-2.3.0.9/src/xttmp.egg-info}/PKG-INFO +1 -1
  7. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/LICENSE +0 -0
  8. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/README.md +0 -0
  9. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/setup.cfg +0 -0
  10. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/__init__.py +0 -0
  11. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/api/__init__.py +0 -0
  12. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/api/evaluate.py +0 -0
  13. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/api/get_visualize_handle.py +0 -0
  14. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/api/instancing_model.py +0 -0
  15. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/__init__.py +0 -0
  16. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/apgstmd_core.py +0 -0
  17. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/apgstmdv2_core.py +0 -0
  18. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/base_core.py +0 -0
  19. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/dstmd_core.py +0 -0
  20. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/estmd_backbone.py +0 -0
  21. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/estmd_core.py +0 -0
  22. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/feedbackstmd_core.py +0 -0
  23. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/fracstmd_core.py +0 -0
  24. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/fstmd_core.py +0 -0
  25. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/fstmdv2_core.py +0 -0
  26. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/haarstmd_core.py +0 -0
  27. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/math_operator.py +0 -0
  28. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/stfeedbackstmd_core.py +0 -0
  29. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/core/stmdplusv2_core.py +0 -0
  30. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/demo/evaluate_model.py +0 -0
  31. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/demo/inference_gui.py +0 -0
  32. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/demo/inference_gui_single_process.py +0 -0
  33. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/demo/inference_image_stream.py +0 -0
  34. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/demo/inference_video.py +0 -0
  35. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/main.py +0 -0
  36. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/__init__.py +0 -0
  37. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/backbone.py +0 -0
  38. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/facilitated_model.py +0 -0
  39. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/feedback_model.py +0 -0
  40. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/haarstmd.py +0 -0
  41. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/model/vstmd.py +0 -0
  42. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/__init__.py +0 -0
  43. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/compute_module.py +0 -0
  44. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/create_kernel.py +0 -0
  45. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/evaluate_module.py +0 -0
  46. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp/util/stmd.ico +0 -0
  47. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp.egg-info/SOURCES.txt +0 -0
  48. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp.egg-info/dependency_links.txt +0 -0
  49. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp.egg-info/entry_points.txt +0 -0
  50. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp.egg-info/requires.txt +0 -0
  51. {xttmp-2.3.0.8 → xttmp-2.3.0.9}/src/xttmp.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xttmp
3
- Version: 2.3.0.8
3
+ Version: 2.3.0.9
4
4
  Summary: eXtremely Tiny Target - Motion Perception
5
5
  Author-email: Shawn MX <mingshuoxu@hotmail.com>
6
6
  Project-URL: Homepage, https://github.com/MingshuoXu/Small-Target-Motion-Detectors
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xttmp"
7
- version = "2.3.0.8"
7
+ version = "2.3.0.9"
8
8
  description = "eXtremely Tiny Target - Motion Perception"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -21,6 +21,8 @@ class ContrastPathway(BaseCore):
21
21
 
22
22
  self.register_buffer('T1_kernel', torch.empty(0))
23
23
 
24
+ self.setup()
25
+
24
26
  def setup(self):
25
27
  """Initialization method."""
26
28
  # 假设 create_T1_kernels 返回的是 4 个 kernel 的 List 或 NumPy array
@@ -34,9 +36,9 @@ class ContrastPathway(BaseCore):
34
36
  """
35
37
 
36
38
  # out 的形状是 (1, 4, H, W)
37
- self.Opt = F.conv2d(x, self.T1_kernel, padding='same')
39
+ self.output = F.conv2d(x, self.T1_kernel, padding='same')
38
40
 
39
- return self.Opt
41
+ return self.output
40
42
 
41
43
 
42
44
  class MushroomBody(BaseCore):
@@ -59,6 +61,8 @@ class MushroomBody(BaseCore):
59
61
  self.trackLens = None # 张量: [N] (记录当前轨迹有效长度)
60
62
  self.trackPtr = None # 张量: [N] (记录环形缓冲区的写入指针)
61
63
 
64
+ self.setup()
65
+
62
66
  def setup(self):
63
67
  self.torch_nms = AreaNMS(self.nms_size)
64
68
 
@@ -69,18 +73,18 @@ class MushroomBody(BaseCore):
69
73
  nmsLobulaOpt = self.torch_nms(maxLobulaOpt)
70
74
 
71
75
  mask_not_nms = (nmsLobulaOpt == 0)
72
- mushroomBodyOpt = lobulaOpt * mask_not_nms
76
+ self.output = lobulaOpt * mask_not_nms
73
77
 
74
78
  maxNumber = torch.max(nmsLobulaOpt)
75
79
  if maxNumber <= 0:
76
80
  self.trackID = None
77
- return mushroomBodyOpt
81
+ return self.output
78
82
 
79
83
  # --- 获取新检测点 ---
80
84
  newID = torch.nonzero(nmsLobulaOpt > 0).float()
81
85
  if len(newID) == 0:
82
86
  self.trackID = None
83
- return mushroomBodyOpt
87
+ return self.output
84
88
 
85
89
  curr_y, curr_x = newID[:, -2].long(), newID[:, -1].long()
86
90
  # all_new_contrasts 形状 [C, M], M是新目标数
@@ -180,8 +184,7 @@ class MushroomBody(BaseCore):
180
184
  e_y = erase_coords[:, -2].long()
181
185
  e_x = erase_coords[:, -1].long()
182
186
  # 终极一键批量擦除
183
- mushroomBodyOpt[..., e_y, e_x] = 0
187
+ self.output[..., e_y, e_x] = 0
184
188
 
185
- self.Opt = mushroomBodyOpt
186
- return mushroomBodyOpt
189
+ return self.output
187
190
 
@@ -73,6 +73,11 @@ class Medulla(BaseCore):
73
73
  self.on_pathway.setup()
74
74
  self.off_pathway.setup()
75
75
 
76
+ def reset_buffer(self):
77
+ # Reset buffers for both pathways
78
+ self.on_pathway.reset_buffer()
79
+ self.off_pathway.reset_buffer()
80
+
76
81
  def forward(self, lamina_ON, lamina_OFF):
77
82
  """
78
83
  Process the input through the Medulla layer.
@@ -282,6 +282,8 @@ class FrameVisualizer:
282
282
  cv2.putText(frame, str(show_str),
283
283
  (10, 30), cv2.FONT_HERSHEY_SIMPLEX, 0.8,
284
284
  (0, 255, 0), 2, cv2.LINE_AA)
285
+
286
+ self.showed_frame = frame # 保存当前帧,便于后续处理或保存
285
287
 
286
288
  # --- 视频保存 (安全检查) ---
287
289
  if self.save_output and self.video_writer is not None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xttmp
3
- Version: 2.3.0.8
3
+ Version: 2.3.0.9
4
4
  Summary: eXtremely Tiny Target - Motion Perception
5
5
  Author-email: Shawn MX <mingshuoxu@hotmail.com>
6
6
  Project-URL: Homepage, https://github.com/MingshuoXu/Small-Target-Motion-Detectors
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes