pyppbox 3.6b8__tar.gz → 3.7b1__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 (94) hide show
  1. {pyppbox-3.6b8/pyppbox.egg-info → pyppbox-3.7b1}/PKG-INFO +1 -1
  2. {pyppbox-3.6b8 → pyppbox-3.7b1}/RELEASENOTES.md +35 -19
  3. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/__init__.py +1 -1
  4. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/centroid/__init__.py +1 -0
  5. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/__init__.py +1 -0
  6. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/sort/__init__.py +1 -0
  7. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/ppb/mt.py +2 -2
  8. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/evatools.py +18 -2
  9. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/mot2pyppbox.py +28 -19
  10. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/visualizetools.py +3 -3
  11. {pyppbox-3.6b8 → pyppbox-3.7b1/pyppbox.egg-info}/PKG-INFO +1 -1
  12. {pyppbox-3.6b8 → pyppbox-3.7b1}/GETSTARTED.md +0 -0
  13. {pyppbox-3.6b8 → pyppbox-3.7b1}/LICENSE +0 -0
  14. {pyppbox-3.6b8 → pyppbox-3.7b1}/MANIFEST.in +0 -0
  15. {pyppbox-3.6b8 → pyppbox-3.7b1}/README.md +0 -0
  16. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/__init__.py +0 -0
  17. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/cfg/cfg.zip +0 -0
  18. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/cfg/detectors.yaml +0 -0
  19. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/cfg/main.yaml +0 -0
  20. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/cfg/reiders.yaml +0 -0
  21. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/cfg/trackers.yaml +0 -0
  22. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/configtools.py +0 -0
  23. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/myconfig.py +0 -0
  24. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/strings/strings.yaml +0 -0
  25. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/strings/strings.zip +0 -0
  26. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/config/unifiedstrings.py +0 -0
  27. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/data/datasets/.gitignore +0 -0
  28. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/data/logs/.gitignore +0 -0
  29. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/data/modules/.gitignore +0 -0
  30. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/data/res/.gitignore +0 -0
  31. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/data/res/idmap.txt +0 -0
  32. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/__init__.py +0 -0
  33. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/assets/TReID.png +0 -0
  34. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/assets/icon.ico +0 -0
  35. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/assets/settings.ico +0 -0
  36. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/guidemo.py +0 -0
  37. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/guihub.py +0 -0
  38. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/guitools.py +0 -0
  39. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/tmp/input.tmp +0 -0
  40. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/tmp/ui.tmp +0 -0
  41. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_centroid.py +0 -0
  42. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_deepsort.py +0 -0
  43. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_facenet.py +0 -0
  44. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_gt.py +0 -0
  45. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_launcher.py +0 -0
  46. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_sort.py +0 -0
  47. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_torchreid.py +0 -0
  48. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_yolocls.py +0 -0
  49. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/gui/ui_yoloult.py +0 -0
  50. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/__init__.py +0 -0
  51. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/detectors/__init__.py +0 -0
  52. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/detectors/yolocls/__init__.py +0 -0
  53. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/detectors/yoloult/__init__.py +0 -0
  54. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/__init__.py +0 -0
  55. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/facenet/__init__.py +0 -0
  56. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/facenet/origin/align_dataset_mtcnn.py +0 -0
  57. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/facenet/origin/detect_face.py +0 -0
  58. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/facenet/origin/facenet.py +0 -0
  59. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/torchreid/__init__.py +0 -0
  60. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/torchreid/model_dict.py +0 -0
  61. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/torchreid/model_dict.yaml +0 -0
  62. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/reiders/torchreid/utils.py +0 -0
  63. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/__init__.py +0 -0
  64. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/detection.py +0 -0
  65. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/detection_yolo.py +0 -0
  66. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/generate_detections.py +0 -0
  67. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/iou_matching.py +0 -0
  68. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/kalman_filter.py +0 -0
  69. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/linear_assignment.py +0 -0
  70. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/nn_matching.py +0 -0
  71. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/preprocessing.py +0 -0
  72. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/track.py +0 -0
  73. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/tracker.py +0 -0
  74. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/deepsort/origin/voc_classes.txt +0 -0
  75. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/modules/trackers/sort/origin/sort.py +0 -0
  76. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/ppb/__init__.py +0 -0
  77. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/standalone/__init__.py +0 -0
  78. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/__init__.py +0 -0
  79. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/commontools.py +0 -0
  80. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/gttools.py +0 -0
  81. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/logtools.py +0 -0
  82. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/persontools.py +0 -0
  83. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox/utils/restools.py +0 -0
  84. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox.egg-info/SOURCES.txt +0 -0
  85. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox.egg-info/dependency_links.txt +0 -0
  86. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox.egg-info/requires.txt +0 -0
  87. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyppbox.egg-info/top_level.txt +0 -0
  88. {pyppbox-3.6b8 → pyppbox-3.7b1}/pyproject.toml +0 -0
  89. {pyppbox-3.6b8 → pyppbox-3.7b1}/requirements/README.md +0 -0
  90. {pyppbox-3.6b8 → pyppbox-3.7b1}/requirements/requirements.txt +0 -0
  91. {pyppbox-3.6b8 → pyppbox-3.7b1}/requirements/test_gpu.py +0 -0
  92. {pyppbox-3.6b8 → pyppbox-3.7b1}/setup.cfg +0 -0
  93. {pyppbox-3.6b8 → pyppbox-3.7b1}/setup.py +0 -0
  94. {pyppbox-3.6b8 → pyppbox-3.7b1}/setup_extra.yaml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyppbox
3
- Version: 3.6b8
3
+ Version: 3.7b1
4
4
  Summary: Toolbox for people detecting, tracking, and re-identifying.
5
5
  Home-page: https://github.com/rathaumons/pyppbox
6
6
  Author: Ratha SIV
@@ -12,10 +12,26 @@
12
12
 
13
13
  ## **pyppbox V3 - Make Simpler and Faster**
14
14
 
15
- * `pyppbox` [v3.6b8](https://github.com/rathaumons/pyppbox/tree/v3.6b8) - The Last V3
15
+ * `pyppbox` [v3.7b1](https://github.com/rathaumons/pyppbox/tree/v3.7b1) - The Last V3
16
+
17
+ - Sync `pyppbox.utils.persontools.Person`'s misc across frames in all trackers
18
+ - Improve and add `--use-numid` for using number id in MOT as the real id in `pyppbox` format
19
+ - **Known issue/limitation**:
20
+ - You tell me :)
21
+
22
+ * `pyppbox` [v3.6b9](https://github.com/rathaumons/pyppbox/tree/v3.6b9) - ~~The Last V3~~
23
+
24
+ - Fix `setMainTracker()` and `setMainReIDer()` for default input
25
+ - Correct `show_ids` documentation in `visualizePeople()`
26
+ - Correct an error message in `visualizePeople()`
27
+ - Update and improve documentation
28
+ - **Known issue/limitation**:
29
+ - You tell me :)
30
+
31
+ * `pyppbox` [v3.6b8](https://github.com/rathaumons/pyppbox/tree/v3.6b8) - ~~The Last V3~~
16
32
 
17
33
  - Fix FaceNet alignment issue in data preparation for training
18
- - Update and improve documentations
34
+ - Update and improve documentation
19
35
  - **Known issue/limitation**:
20
36
  - You tell me :)
21
37
 
@@ -24,14 +40,14 @@
24
40
  - Improve examples
25
41
  - Improve requirements
26
42
  - Update and improve `GETSTARTED.md`
27
- - Update and improve documentations
43
+ - Update and improve documentation
28
44
  - **Known issue/limitation**:
29
45
  - You tell me :)
30
46
 
31
47
  * `pyppbox` [v3.6b6](https://github.com/rathaumons/pyppbox/tree/v3.6b6) - ~~The Last V3~~
32
48
 
33
49
  - Add proper supports for YOLOv9, YOLOv10, and YOLOv11
34
- - Update requirements and documentations
50
+ - Update requirements and documentation
35
51
  - **Known issue/limitation**:
36
52
  - You tell me :)
37
53
 
@@ -58,7 +74,7 @@
58
74
  * `pyppbox` [v3.6b2](https://github.com/rathaumons/pyppbox/tree/v3.6b2)
59
75
 
60
76
  - Add a warning for the changes in the coming major version 4
61
- - Update documentations
77
+ - Update documentation
62
78
  - **Known issue/limitation**:
63
79
  - You tell me :)
64
80
 
@@ -66,10 +82,10 @@
66
82
 
67
83
  - Replace `pyunpack` & `patool` with `shutil`
68
84
  - Improve Example 9 - example_09_eva_offline.py
69
- - Add `pyppbox.gui.guitools` to the documentations
85
+ - Add `pyppbox.gui.guitools` to the documentation
70
86
  - Fix `useInternalConfigDir()` in `pyppbox.gui.guitools`
71
87
  - Fix sphinx-build warning for utils.rst
72
- - Fix and improve documentations
88
+ - Fix and improve documentation
73
89
  - **Known issue/limitation**:
74
90
  - You tell me :)
75
91
 
@@ -77,7 +93,7 @@
77
93
 
78
94
  - Increase default random ID range in evatools
79
95
  - Add exception to `generateStaticID()` in `pyppbox.utils.evatools.TKOReider`
80
- - Update documentations
96
+ - Update documentation
81
97
  - **Known issue/limitation**:
82
98
  - You tell me :)
83
99
 
@@ -85,7 +101,7 @@
85
101
 
86
102
  - Add Python 3.12 support
87
103
  - Change GUI Demo title
88
- - Update documentations
104
+ - Update documentation
89
105
  - Update and improve GitHub workflows
90
106
  - **Known issue/limitation**:
91
107
  - You tell me :)
@@ -94,7 +110,7 @@
94
110
 
95
111
  - Add freedom of input video without GT (Ground-truth) in GUI demo
96
112
  - Update GitHub workflows
97
- - Update and improve documentations
113
+ - Update and improve documentation
98
114
  - **Known issue/limitation**:
99
115
  - You tell me :)
100
116
 
@@ -106,7 +122,7 @@
106
122
  - Add `min_width_filter` support for `detectPeople()` of `ppbox.standalone`
107
123
  - Add alternative repspoint support for `detectPeople()` of `ppbox.standalone` and all detectors
108
124
  - Add [MOT Challenge ground-truth](https://motchallenge.net/instructions/) converter -> `pyppbox.utils.mot2pyppbox`
109
- - Improve documentations
125
+ - Improve documentation
110
126
  - **Known issue/limitation**:
111
127
  - You tell me :)
112
128
 
@@ -114,14 +130,14 @@
114
130
 
115
131
  - Remove `ontracked` and its related methods from `pyppbox.utils.persontools.Person`
116
132
  - Add `misc` to `pyppbox.utils.persontools.Person`
117
- - Improve documentations
133
+ - Improve documentation
118
134
  - **Known issue/limitation**:
119
135
  - You tell me :)
120
136
 
121
137
  * `pyppbox` [v3.2b2](https://github.com/rathaumons/pyppbox/tree/v3.2b2)
122
138
 
123
139
  - Add a hotfix for issue [#21](https://github.com/rathaumons/pyppbox/issues/21)
124
- - Improve documentations
140
+ - Improve documentation
125
141
  - **Known issue/limitation**:
126
142
  - You tell me :)
127
143
 
@@ -140,7 +156,7 @@
140
156
 
141
157
  - Fix minor visaul bug
142
158
  - Add `install_req_py3_cuda121.cmd` for CUDA 12.1
143
- - Improve documentations
159
+ - Improve documentation
144
160
  - Drop support for Python 3.8
145
161
  - **Known issue/limitation**:
146
162
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
@@ -148,7 +164,7 @@
148
164
  * `pyppbox` [v3.1b4](https://github.com/rathaumons/pyppbox/tree/v3.1b4)
149
165
 
150
166
  - Improve support for new `pyppbox-ultralytics`
151
- - Improve documentations
167
+ - Improve documentation
152
168
  - **Known issue/limitation**:
153
169
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
154
170
 
@@ -156,7 +172,7 @@
156
172
 
157
173
  - Update and improve visualizetools for new `pyppbox-ultralytics`
158
174
  - Update requirements
159
- - Improve documentations
175
+ - Improve documentation
160
176
  - **Known issue/limitation**:
161
177
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
162
178
 
@@ -166,7 +182,7 @@
166
182
  - Improve evatools
167
183
  - Change some default configurations
168
184
  - Update and improve examples
169
- - Improve documentations
185
+ - Improve documentation
170
186
  - **Known issue/limitation**:
171
187
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
172
188
 
@@ -178,7 +194,7 @@
178
194
  - Implement install requirements/dependencies -> See setup.py
179
195
  - Simplify and improve requirements
180
196
  - Update default config files
181
- - Update and improve documentations
197
+ - Update and improve documentation
182
198
  - Update and improve GUI
183
199
  - **Known issue/limitation**:
184
200
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
@@ -219,7 +235,7 @@
219
235
  - Improve setup quality
220
236
  - Improve GUI stability
221
237
  - Update and normalize dependencies/requirements
222
- - Update and improve documentations
238
+ - Update and improve documentation
223
239
  - **Known issue/limitation**:
224
240
  - [Issue] YOLO Ultralytics: May throw `CUDA error: an illegal memory access was encountered` in multithread application
225
241
 
@@ -47,7 +47,7 @@ from pyppbox.gui.guitools import (
47
47
  )
48
48
 
49
49
 
50
- __version__ = '3.6b8'
50
+ __version__ = '3.7b1'
51
51
  __author__ = 'Ratha SIV'
52
52
  __description__ = 'Toolbox for people detecting, tracking, and re-identifying.'
53
53
  __homepage__ = 'https://rathaumons.github.io/pyppbox'
@@ -103,6 +103,7 @@ class MyCentroid(object):
103
103
  self.previous_list[pindex].faceid_conf,
104
104
  self.previous_list[pindex].deepid_conf
105
105
  )
106
+ self.current_list[i].misc = self.previous_list[pindex].misc
106
107
  self.used_cids.append(prev_cid)
107
108
  # self.previous_list.pop(pindex)
108
109
  else:
@@ -149,6 +149,7 @@ class MyDeepSORT(object):
149
149
  self.current_list[cindex].deepid = self.previous_list[pindex].deepid
150
150
  self.current_list[cindex].faceid_conf = self.previous_list[pindex].faceid_conf
151
151
  self.current_list[cindex].deepid_conf = self.previous_list[pindex].deepid_conf
152
+ self.current_list[cindex].misc = self.previous_list[pindex].misc
152
153
  else:
153
154
  msg = ("MyDeepSORT : update() -> The element of input 'person_list' " +
154
155
  "list has unsupported type.")
@@ -110,6 +110,7 @@ class MySORT(object):
110
110
  self.current_list[i].deepid = self.previous_list[pindex].deepid
111
111
  self.current_list[i].faceid_conf = self.previous_list[pindex].faceid_conf
112
112
  self.current_list[i].deepid_conf = self.previous_list[pindex].deepid_conf
113
+ self.current_list[i].misc = self.previous_list[pindex].misc
113
114
  else:
114
115
  msg = ("MySORT : update() -> The element of input 'person_list' list " +
115
116
  "has unsupported type.")
@@ -571,7 +571,7 @@ class MT(object):
571
571
  if (isDictString(tracker) or "yaml" in tracker.lower() or
572
572
  "json" in tracker.lower()):
573
573
  self.__setCustomTracker__(getCFGDict(tracker))
574
- elif tracker.lower() == "default":
574
+ elif tracker.lower() == "":
575
575
  if not self.__cfg_is_set__: self.setConfigDir()
576
576
  self.__loadDefaultTracker__()
577
577
  add_info_log("---PYPPBOX : Use tracker according to the \"main.yaml\"")
@@ -749,7 +749,7 @@ class MT(object):
749
749
  if (isDictString(reider) or "yaml" in reider.lower() or
750
750
  "json" in reider.lower()):
751
751
  self.__setCustomReIDer__(getCFGDict(reider), auto_load)
752
- elif reider.lower() == "default":
752
+ elif reider.lower() == "":
753
753
  if not self.__cfg_is_set__: self.setConfigDir()
754
754
  self.__loadDefaultReIDer__(auto_load=auto_load)
755
755
  add_info_log("---PYPPBOX : Use reider according to the \"main.yaml\"")
@@ -341,9 +341,25 @@ class NothingTracker(object):
341
341
  A class acted as a tracker which does not perform any tracking.
342
342
  """
343
343
  def __init__(self):
344
- pass
344
+ self.previous_list = []
345
+ self.current_list = []
346
+ def _getIndex(self, deepid):
347
+ pindex = -1
348
+ for i in range(0, len(self.previous_list)):
349
+ if deepid == self.previous_list[i].deepid:
350
+ pindex = i
351
+ break
352
+ return pindex
345
353
  def update(self, pp, img=None):
346
- return pp
354
+ self.previous_list = self.current_list
355
+ self.current_list = pp
356
+ for i in range (0, len(self.current_list)):
357
+ if len(self.previous_list) > 0:
358
+ pindex = self._getIndex(self.current_list[i].deepid)
359
+ if pindex >= 0:
360
+ self.current_list[i].misc = self.previous_list[pindex].misc
361
+
362
+ return self.current_list
347
363
 
348
364
 
349
365
  class NothingReider(object):
@@ -47,12 +47,16 @@ def remove_from_splitter(input_line, splitter=',', from_spl=6, with_newline=Fals
47
47
  if with_newline: res = res + "\n"
48
48
  return res
49
49
 
50
- # step 2: replace 2nd colum with repspoint and readID
51
- def replace_column_with(input_line, splitter=',', column_index=2, with_str="(0, 0) XXX", with_newline=False):
50
+ # step 2: replace 2nd colum with repspoint and realID
51
+ def replace_column_with(input_line, splitter=',', column_index=2, with_str="(0, 0) XXX", use_numid=True, with_newline=False):
52
52
  """
53
53
  :meta private:
54
54
  """
55
55
  spl_indexs = [i for i, char in enumerate(input_line) if char == splitter]
56
+ if use_numid:
57
+ num_id = input_line[spl_indexs[0] + 1:spl_indexs[1]]
58
+ with_str = with_str.replace("XXX", str(num_id))
59
+ # print(f"with_str = {with_str}")
56
60
  res = input_line[0:spl_indexs[column_index - 2] + 1] + with_str + input_line[spl_indexs[column_index - 1]:]
57
61
  if with_newline: res = res + "\n"
58
62
  return res
@@ -81,11 +85,12 @@ def finalize(input_line, splitter=',', find_repspoint=True, alt_repspoint=False,
81
85
  return res
82
86
 
83
87
  # AIO
84
- def convert(input_file="det.txt",
85
- output_file="det_pyppbox.txt",
86
- splitter=',',
87
- min_conf=0.25,
88
- max_conf=1.00,
88
+ def convert(input_file="gt.txt",
89
+ output_file="gt_pyppbox.txt",
90
+ splitter=',',
91
+ use_numid=True,
92
+ min_conf=0.0,
93
+ max_conf=1.0,
89
94
  find_repspoint=True,
90
95
  alt_repspoint=False,
91
96
  alt_repspoint_top=True):
@@ -93,15 +98,17 @@ def convert(input_file="det.txt",
93
98
 
94
99
  Parameters
95
100
  ----------
96
- input_file : str, default="det.txt"
101
+ input_file : str, default="gt.txt"
97
102
  Input MOT Challenge text file.
98
- output_file : str, default="det_pyppbox.txt"
103
+ output_file : str, default="gt_pyppbox.txt"
99
104
  Output pyppbox text file.
100
105
  splitter : str, default=','
101
106
  Column or data splitter.
102
- min_conf : float, default=0.25
107
+ use_numid : bool, default=False
108
+ Whether to use number id as real id.
109
+ min_conf : float, default=0.0
103
110
  Filter for minimum conf.
104
- max_conf : float, default=1.00
111
+ max_conf : float, default=1.0
105
112
  Filter for maximum conf.
106
113
  find_repspoint : bool, default=True
107
114
  Whether to calculate repspoint.
@@ -119,7 +126,7 @@ def convert(input_file="det.txt",
119
126
  line = line.replace("\r", "")
120
127
  line = line.replace("\n", "")
121
128
  line = remove_from_splitter(line, splitter=splitter)
122
- line = replace_column_with(line, splitter=splitter)
129
+ line = replace_column_with(line, splitter=splitter, use_numid=use_numid)
123
130
  line = finalize(line,
124
131
  splitter=splitter,
125
132
  find_repspoint=find_repspoint,
@@ -136,19 +143,21 @@ if __name__ == "__main__":
136
143
 
137
144
  parser = argparse.ArgumentParser(description="Convert ground-truth of MOT Challenge text file to pyppbox format.")
138
145
 
139
- parser.add_argument("--input-file", type=str, default="det.txt", help="Input MOT Challenge text file")
140
- parser.add_argument("--output-file", type=str, default="det_pyppbox.txt", help="Output pyppbox text file")
146
+ parser.add_argument("input_file", type=str, default="gt.txt", help="Input MOT Challenge text file")
147
+ parser.add_argument("output_file", type=str, default="gt_pyppbox.txt", help="Output pyppbox text file")
141
148
  parser.add_argument("--splitter", type=str, default=',', help="Column or data splitter")
142
- parser.add_argument("--min-conf", type=float, default='0.25', help="Filter for minimum conf")
143
- parser.add_argument("--max-conf", type=float, default='1.00', help="Filter for maximum conf")
144
- parser.add_argument("--find-repspoint", type=bool, default=True, help="Whether to calculate repspoint")
145
- parser.add_argument("--alt-repspoint", type=bool, default=False, help="Whether to use alternative repspoint")
146
- parser.add_argument("--alt-repspoint-top", type=bool, default=True, help="Whether y is the top for alternative repspoint")
149
+ parser.add_argument("--use-numid", type=lambda s: s.lower() in ['true', 't', 'yes', '1'], default=1, help="Whether to use number id as real id")
150
+ parser.add_argument("--min-conf", type=float, default='0.0', help="Filter for minimum conf")
151
+ parser.add_argument("--max-conf", type=float, default='1.0', help="Filter for maximum conf")
152
+ parser.add_argument("--find-repspoint", type=lambda s: s.lower() in ['true', 't', 'yes', '1'], default=1, help="Whether to calculate repspoint")
153
+ parser.add_argument("--alt-repspoint", type=lambda s: s.lower() in ['true', 't', 'yes', '1'], default=0, help="Whether to use alternative repspoint")
154
+ parser.add_argument("--alt-repspoint-top", type=lambda s: s.lower() in ['true', 't', 'yes', '1'], default=1, help="Whether y is the top for alternative repspoint")
147
155
 
148
156
  args = parser.parse_args()
149
157
  convert(input_file=args.input_file,
150
158
  output_file=args.output_file,
151
159
  splitter=args.splitter,
160
+ use_numid=args.use_numid,
152
161
  min_conf=args.min_conf,
153
162
  max_conf=args.max_conf,
154
163
  find_repspoint=args.find_repspoint,
@@ -120,8 +120,8 @@ def visualizePeople(img, people, show_box=True, show_skl=(True,True,5), show_ids
120
120
  show_ids : tuple(bool, bool, bool), default=(True,True,True)
121
121
  Set whether to visualize the IDs.
122
122
  Set the first element to :code:`True` to visualize the cid.
123
- Set the second element to :code:`True` to visualize the faceid.
124
- Set the third element to :code:`True` to visualize the deepid.
123
+ Set the second element to :code:`True` to visualize the deepid.
124
+ Set the third element to :code:`True` to visualize the faceid.
125
125
  show_reid : tuple(int, int), default=(0,0)
126
126
  :obj:`show_reid` is corresponding to :obj:`reid_count` in :func:`reidPeople()`
127
127
  Tuple of (ReID count, ReID deduplicate count)
@@ -183,7 +183,7 @@ def visualizePeople(img, people, show_box=True, show_skl=(True,True,5), show_ids
183
183
  cv2.putText(img, "DEDUPLICATING <-", reid_pos, reid_status_font,
184
184
  1, reid_dup_col, 1, cv2.LINE_AA)
185
185
  else:
186
- msg = "visualizePeople() -> show_ids='" + str(show_ids) + "' is not valid."
186
+ msg = "visualizePeople() -> show_reid=" + str(show_reid) + " is not valid."
187
187
  add_error_log(msg)
188
188
  raise ValueError(msg)
189
189
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyppbox
3
- Version: 3.6b8
3
+ Version: 3.7b1
4
4
  Summary: Toolbox for people detecting, tracking, and re-identifying.
5
5
  Home-page: https://github.com/rathaumons/pyppbox
6
6
  Author: Ratha SIV
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes