xttmp 2.3.0.4__tar.gz → 2.3.0.5__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.4/src/xttmp.egg-info → xttmp-2.3.0.5}/PKG-INFO +2 -2
  2. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/README.md +1 -1
  3. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/pyproject.toml +1 -1
  4. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/math_operator.py +12 -4
  5. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/demo/inference_gui.py +4 -6
  6. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/main.py +0 -8
  7. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/haarstmd.py +1 -0
  8. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/iostream.py +3 -3
  9. {xttmp-2.3.0.4 → xttmp-2.3.0.5/src/xttmp.egg-info}/PKG-INFO +2 -2
  10. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/LICENSE +0 -0
  11. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/setup.cfg +0 -0
  12. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/__init__.py +0 -0
  13. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/api/__init__.py +0 -0
  14. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/api/evaluate.py +0 -0
  15. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/api/get_visualize_handle.py +0 -0
  16. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/api/instancing_model.py +0 -0
  17. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/__init__.py +0 -0
  18. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/apgstmd_core.py +0 -0
  19. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/apgstmdv2_core.py +0 -0
  20. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/base_core.py +0 -0
  21. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/dstmd_core.py +0 -0
  22. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/estmd_backbone.py +0 -0
  23. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/estmd_core.py +0 -0
  24. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/feedbackstmd_core.py +0 -0
  25. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/fracstmd_core.py +0 -0
  26. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/fstmd_core.py +0 -0
  27. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/fstmdv2_core.py +0 -0
  28. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/haarstmd_core.py +0 -0
  29. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/stfeedbackstmd_core.py +0 -0
  30. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/stmdplus_core.py +0 -0
  31. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/stmdplusv2_core.py +0 -0
  32. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/core/vstmd_core.py +0 -0
  33. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/demo/evaluate_model.py +0 -0
  34. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/demo/inference_gui_single_process.py +0 -0
  35. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/demo/inference_image_stream.py +0 -0
  36. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/demo/inference_video.py +0 -0
  37. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/__init__.py +0 -0
  38. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/backbone.py +0 -0
  39. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/facilitated_model.py +0 -0
  40. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/feedback_model.py +0 -0
  41. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/model/vstmd.py +0 -0
  42. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/__init__.py +0 -0
  43. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/compute_module.py +0 -0
  44. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/create_kernel.py +0 -0
  45. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/evaluate_module.py +0 -0
  46. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp/util/stmd.ico +0 -0
  47. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp.egg-info/SOURCES.txt +0 -0
  48. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp.egg-info/dependency_links.txt +0 -0
  49. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp.egg-info/entry_points.txt +0 -0
  50. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/src/xttmp.egg-info/requires.txt +0 -0
  51. {xttmp-2.3.0.4 → xttmp-2.3.0.5}/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.4
3
+ Version: 2.3.0.5
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
@@ -30,7 +30,7 @@ Dynamic: license-file
30
30
 
31
31
  # Small Target Motion Detectors, Version 2.3 (XTT-MP: Extremely Tiny Target - Motion Perception)
32
32
 
33
- [![PyPI version](https://img.shields.io/pypi/v/XTT-MP.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
33
+ [![PyPI version](https://img.shields.io/pypi/v/xttmp.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
34
34
 
35
35
 
36
36
  **XTT-MP** (Extremely Tiny Target - Motion Perception) is a natural architecture-based framework specifically designed for detecting and perceiving the motion of **extremely small targets** in complex environments.
@@ -1,6 +1,6 @@
1
1
  # Small Target Motion Detectors, Version 2.3 (XTT-MP: Extremely Tiny Target - Motion Perception)
2
2
 
3
- [![PyPI version](https://img.shields.io/pypi/v/XTT-MP.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
3
+ [![PyPI version](https://img.shields.io/pypi/v/xttmp.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
4
4
 
5
5
 
6
6
  **XTT-MP** (Extremely Tiny Target - Motion Perception) is a natural architecture-based framework specifically designed for detecting and perceiving the motion of **extremely small targets** in complex environments.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xttmp"
7
- version = "2.3.0.4"
7
+ version = "2.3.0.5"
8
8
  description = "eXtremely Tiny Target - Motion Perception"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -102,7 +102,9 @@ class GaussianBlur(BaseCore):
102
102
  weight = self.blur_kernel.expand(C, 1, self.kernel_size, self.kernel_size)
103
103
 
104
104
  # 使用深度可分离卷积(groups=C),每个通道独立进行高斯模糊
105
- return F.conv2d(x, weight, padding='same', groups=C)
105
+ self.output = F.conv2d(x, weight, padding='same', groups=C)
106
+
107
+ return self.output
106
108
 
107
109
 
108
110
  class GammaDelay(BaseCore):
@@ -161,7 +163,9 @@ class GammaDelay(BaseCore):
161
163
  else:
162
164
  self.buffer.append(x)
163
165
 
164
- return compute_temporal_conv_inplace(self.buffer, self.gamma_kernel)
166
+ self.output = compute_temporal_conv_inplace(self.buffer, self.gamma_kernel)
167
+
168
+ return self.output
165
169
 
166
170
 
167
171
  class GammaBandPassFilter(BaseCore):
@@ -236,7 +240,9 @@ class GammaBandPassFilter(BaseCore):
236
240
  else:
237
241
  self.buffer.append(x)
238
242
 
239
- return compute_temporal_conv_inplace(self.buffer, self.bandpass_kernel)
243
+ self.output = compute_temporal_conv_inplace(self.buffer, self.bandpass_kernel)
244
+
245
+ return self.output
240
246
 
241
247
 
242
248
  class SpatialInhibition(BaseCore):
@@ -304,4 +310,6 @@ class SpatialInhibition(BaseCore):
304
310
  weight = self.kernel.expand(C, 1, self.kernel_size, self.kernel_size)
305
311
 
306
312
  # groups=C 表示进行深度可分离卷积(Depthwise Convolution),每个通道独立滤波
307
- return F.relu(F.conv2d(x, weight, padding='same', groups=C))
313
+ self.output = F.relu(F.conv2d(x, weight, padding='same', groups=C))
314
+
315
+ return self.output
@@ -18,9 +18,6 @@ from xttmp.util.iostream import ( # type: ignore
18
18
  FrameIterator,
19
19
  FrameVisualizer,
20
20
  )
21
- from xttmp.api import instancing_model
22
-
23
-
24
21
  # configure logging
25
22
  logging.basicConfig(level=logging.INFO,
26
23
  format='%(asctime)s - %(levelname)s - %(message)s')
@@ -34,7 +31,6 @@ class StmdGui:
34
31
  self.FrameIterator = FrameIterator
35
32
  self.FrameVisualizer = FrameVisualizer
36
33
  self.post_processor = None
37
- self.instancing_model = instancing_model
38
34
 
39
35
  def _get_user_input(self) -> tuple:
40
36
  """ get user input """
@@ -89,7 +85,9 @@ class StmdGui:
89
85
  self.post_processor = post_processor
90
86
  self.device = device
91
87
  reader = self._create_frame_reader(opt1, opt2)
92
- model = self.instancing_model(model_name, device)
88
+
89
+ from xttmp.api import instancing_model
90
+ model = instancing_model(model_name, device)
93
91
 
94
92
  visualizer = self.FrameVisualizer(
95
93
  window_name=model_name,
@@ -114,7 +112,7 @@ class StmdGui:
114
112
  run_time = time.perf_counter() - time_start
115
113
 
116
114
  post_res = post_processor(result['response'], result.get('direction'))
117
- show_str = f'{self.device} : {run_time*1000:.1f} ms'
115
+ show_str = f'{self.device.upper()} : {run_time*1000:.1f} ms'
118
116
  if not visualizer.update(color_img, result=post_res, show_str=show_str):
119
117
  break
120
118
 
@@ -2,14 +2,6 @@ from pathlib import Path
2
2
  import subprocess
3
3
  import sys
4
4
 
5
- try:
6
- import torch
7
- except ImportError:
8
- raise ImportError(
9
- "Please install PyTorch first. "
10
- "See https://pytorch.org/get-started/locally/"
11
- )
12
-
13
5
  def main():
14
6
  script_path = Path(__file__).resolve().parent / 'demo' / 'inference_gui.py'
15
7
  result = subprocess.run([sys.executable, str(script_path)], check=False)
@@ -4,6 +4,7 @@ from ..core import haarstmd_core
4
4
  from .backbone import ESTMDBackbone
5
5
  from ..util.compute_module import compute_response, compute_direction
6
6
 
7
+
7
8
  class HaarSTMD(ESTMDBackbone):
8
9
  ''' HaarSTMD: Advancing small target motion detection in dim light
9
10
 
@@ -451,7 +451,7 @@ class ModelSelectorGUI:
451
451
  self.root = root
452
452
 
453
453
  def create_gui(self, modelList):
454
- self.modelLabel = ttk.Label(self.root, text="Select a model:", width = 15)
454
+ self.modelLabel = ttk.Label(self.root, text="Select A Model:", width = 15)
455
455
  self.modelLabel.grid(row=0, column=0, padx=10, pady=10)
456
456
 
457
457
  self.modelCombobox = ttk.Combobox(self.root, values=modelList, width = 25)
@@ -596,14 +596,14 @@ class PostProcessingSelectorGUI:
596
596
  self.selectedOption = tk.IntVar(value=2)
597
597
 
598
598
  self.dotLabel = ttk.Radiobutton(self.root,
599
- text='dot output',
599
+ text='STMD Output',
600
600
  variable=self.selectedOption,
601
601
  value=2,
602
602
  command=self.select_dot)
603
603
  self.dotLabel.grid(row=5, column=1, padx=10, pady=10, sticky="w")
604
604
 
605
605
  self.bboxLabel = ttk.Radiobutton(self.root,
606
- text='bbox output',
606
+ text='Bbox Output',
607
607
  variable=self.selectedOption,
608
608
  value=1,
609
609
  command=self.select_bbox)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xttmp
3
- Version: 2.3.0.4
3
+ Version: 2.3.0.5
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
@@ -30,7 +30,7 @@ Dynamic: license-file
30
30
 
31
31
  # Small Target Motion Detectors, Version 2.3 (XTT-MP: Extremely Tiny Target - Motion Perception)
32
32
 
33
- [![PyPI version](https://img.shields.io/pypi/v/XTT-MP.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
33
+ [![PyPI version](https://img.shields.io/pypi/v/xttmp.svg)](https://pypi.org/project/xttmp/) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Python](https://img.shields.io/badge/python-3.8%2B-blue)](https://www.python.org/) [![PyTorch](https://img.shields.io/badge/pytorch-1.10%2B-ee4c2c)](https://pytorch.org/)
34
34
 
35
35
 
36
36
  **XTT-MP** (Extremely Tiny Target - Motion Perception) is a natural architecture-based framework specifically designed for detecting and perceiving the motion of **extremely small targets** in complex environments.
File without changes
File without changes
File without changes
File without changes