xttmp 2.3.0.3__tar.gz → 2.3.0.4__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.3/src/xttmp.egg-info → xttmp-2.3.0.4}/PKG-INFO +4 -3
  2. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/README.md +3 -2
  3. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/pyproject.toml +1 -1
  4. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/iostream.py +41 -16
  5. {xttmp-2.3.0.3 → xttmp-2.3.0.4/src/xttmp.egg-info}/PKG-INFO +4 -3
  6. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/LICENSE +0 -0
  7. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/setup.cfg +0 -0
  8. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/__init__.py +0 -0
  9. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/api/__init__.py +0 -0
  10. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/api/evaluate.py +0 -0
  11. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/api/get_visualize_handle.py +0 -0
  12. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/api/instancing_model.py +0 -0
  13. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/__init__.py +0 -0
  14. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/apgstmd_core.py +0 -0
  15. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/apgstmdv2_core.py +0 -0
  16. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/base_core.py +0 -0
  17. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/dstmd_core.py +0 -0
  18. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/estmd_backbone.py +0 -0
  19. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/estmd_core.py +0 -0
  20. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/feedbackstmd_core.py +0 -0
  21. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/fracstmd_core.py +0 -0
  22. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/fstmd_core.py +0 -0
  23. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/fstmdv2_core.py +0 -0
  24. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/haarstmd_core.py +0 -0
  25. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/math_operator.py +0 -0
  26. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/stfeedbackstmd_core.py +0 -0
  27. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/stmdplus_core.py +0 -0
  28. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/stmdplusv2_core.py +0 -0
  29. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/core/vstmd_core.py +0 -0
  30. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/demo/evaluate_model.py +0 -0
  31. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/demo/inference_gui.py +0 -0
  32. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/demo/inference_gui_single_process.py +0 -0
  33. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/demo/inference_image_stream.py +0 -0
  34. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/demo/inference_video.py +0 -0
  35. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/main.py +0 -0
  36. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/__init__.py +0 -0
  37. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/backbone.py +0 -0
  38. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/facilitated_model.py +0 -0
  39. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/feedback_model.py +0 -0
  40. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/haarstmd.py +0 -0
  41. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/model/vstmd.py +0 -0
  42. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/__init__.py +0 -0
  43. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/compute_module.py +0 -0
  44. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/create_kernel.py +0 -0
  45. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/evaluate_module.py +0 -0
  46. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp/util/stmd.ico +0 -0
  47. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp.egg-info/SOURCES.txt +0 -0
  48. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp.egg-info/dependency_links.txt +0 -0
  49. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp.egg-info/entry_points.txt +0 -0
  50. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/src/xttmp.egg-info/requires.txt +0 -0
  51. {xttmp-2.3.0.3 → xttmp-2.3.0.4}/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.3
3
+ Version: 2.3.0.4
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/XTT-MP/) [![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/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/)
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.
@@ -67,13 +67,14 @@ Built with modularity and extensibility in mind, XTT-MP provides a robust suite
67
67
  - After `pip install xttmp`, use the installed code and bring your own input data, or run from a repository checkout to access the bundled examples.
68
68
 
69
69
  ### Via PyPI
70
- #### CPU
70
+ #### CPU / MPS
71
71
  ```bash
72
72
  pip install xttmp[torch]
73
73
  ```
74
74
 
75
75
  #### NVIDIA GPU (CUDA 12.6)
76
76
  ```bash
77
+ pip install xttmp
77
78
  pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
78
79
  ```
79
80
 
@@ -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/XTT-MP/) [![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/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/)
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.
@@ -37,13 +37,14 @@ Built with modularity and extensibility in mind, XTT-MP provides a robust suite
37
37
  - After `pip install xttmp`, use the installed code and bring your own input data, or run from a repository checkout to access the bundled examples.
38
38
 
39
39
  ### Via PyPI
40
- #### CPU
40
+ #### CPU / MPS
41
41
  ```bash
42
42
  pip install xttmp[torch]
43
43
  ```
44
44
 
45
45
  #### NVIDIA GPU (CUDA 12.6)
46
46
  ```bash
47
+ pip install xttmp
47
48
  pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
48
49
  ```
49
50
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "xttmp"
7
- version = "2.3.0.3"
7
+ version = "2.3.0.4"
8
8
  description = "eXtremely Tiny Target - Motion Perception"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -644,14 +644,20 @@ class PostProcessingSelectorGUI:
644
644
  raise ValueError(f"Unknown output type: {self.output_type}")
645
645
 
646
646
  def update_show_threshold(self, *args):
647
- value = float(self.showThresholdVar.get())
647
+ try:
648
+ value = float(self.showThresholdVar.get())
649
+ except ValueError:
650
+ value = 0.0
648
651
  self.show_threshold = min(max(value, 0.0), 1.0) # 确保在 [0.0, 1.0] 范围内
649
652
 
650
653
  def update_top_num(self, *args):
651
- value = int(self.getTopNumVar.get())
652
- self.top_num = max(value, 1) # 确保 top_num 至少为 1
653
-
654
+ try:
655
+ value = int(self.getTopNumVar.get())
656
+ except ValueError:
657
+ # 如果输入为空或者包含非数字字符,赋予一个默认值
658
+ value = 0
654
659
 
660
+ self.top_num = max(value, 1) # 确保 top_num 至少为 1
655
661
 
656
662
 
657
663
  class DeviceSelectorGUI:
@@ -667,26 +673,37 @@ class DeviceSelectorGUI:
667
673
  if torch.cuda.is_available():
668
674
  self.selectedOption.set(2)
669
675
  self.device = "cuda"
670
-
671
- self.cpuLabel = ttk.Radiobutton(self.root,
672
- text='CPU',
673
- variable=self.selectedOption,
674
- value=1,
675
- command=self.select_cpu)
676
- self.cpuLabel.grid(row=8, column=1, padx=10, pady=10, sticky="w")
677
676
 
678
- self.gpuLabel = ttk.Radiobutton(self.root,
679
- text='GPU',
677
+ self.device_frame = ttk.Frame(self.root)
678
+ self.device_frame.grid(row=8, column=1, columnspan=2, padx=10, pady=10, sticky="w")
679
+
680
+ self.cpuLabel = ttk.Radiobutton(self.device_frame,
681
+ text='CPU',
682
+ variable=self.selectedOption,
683
+ value=1,
684
+ command=self.select_cpu)
685
+ # 使用 pack(side="left") 可以让它们在 frame 内从左到右水平挨着排列
686
+ self.cpuLabel.pack(side="left", padx=(0, 20)) # 右侧留 20px 间距
687
+
688
+ self.cudaLabel = ttk.Radiobutton(self.device_frame,
689
+ text='CUDA',
680
690
  variable=self.selectedOption,
681
691
  value=2,
682
- command=self.select_gpu)
683
- self.gpuLabel.grid(row=8, column=2, padx=10, pady=10, sticky="w")
692
+ command=self.select_cuda)
693
+ self.cudaLabel.pack(side="left", padx=(0, 20))
694
+
695
+ self.mpsLabel = ttk.Radiobutton(self.device_frame,
696
+ text='MPS',
697
+ variable=self.selectedOption,
698
+ value=3,
699
+ command=self.select_mps)
700
+ self.mpsLabel.pack(side="left")
684
701
 
685
702
  def select_cpu(self):
686
703
  self.selectedOption.set(1)
687
704
  self.device = "cpu"
688
705
 
689
- def select_gpu(self):
706
+ def select_cuda(self):
690
707
  if torch.cuda.is_available():
691
708
  self.selectedOption.set(2)
692
709
  self.device = "cuda"
@@ -694,6 +711,14 @@ class DeviceSelectorGUI:
694
711
  messagebox.showinfo("Message title", "CUDA is not available. Please select CPU.")
695
712
  self.select_cpu()
696
713
 
714
+ def select_mps(self):
715
+ if torch.backends.mps.is_available():
716
+ self.selectedOption.set(3)
717
+ self.device = "mps"
718
+ else:
719
+ messagebox.showinfo("Message title", "Metal Performance Shaders (MPS) is not available. Please select CPU.")
720
+ self.select_cpu()
721
+
697
722
 
698
723
  class XTTMP_GUI:
699
724
  def __init__(self, root):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xttmp
3
- Version: 2.3.0.3
3
+ Version: 2.3.0.4
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/XTT-MP/) [![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/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/)
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.
@@ -67,13 +67,14 @@ Built with modularity and extensibility in mind, XTT-MP provides a robust suite
67
67
  - After `pip install xttmp`, use the installed code and bring your own input data, or run from a repository checkout to access the bundled examples.
68
68
 
69
69
  ### Via PyPI
70
- #### CPU
70
+ #### CPU / MPS
71
71
  ```bash
72
72
  pip install xttmp[torch]
73
73
  ```
74
74
 
75
75
  #### NVIDIA GPU (CUDA 12.6)
76
76
  ```bash
77
+ pip install xttmp
77
78
  pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
78
79
  ```
79
80
 
File without changes
File without changes
File without changes
File without changes
File without changes