dnt 0.3.1.3__tar.gz → 0.3.1.7__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 (323) hide show
  1. {dnt-0.3.1.3/dnt.egg-info → dnt-0.3.1.7}/PKG-INFO +13 -4
  2. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/__init__.py +1 -1
  3. dnt-0.3.1.7/dnt/analysis/__init__.py +8 -0
  4. dnt-0.3.1.7/dnt/analysis/count.py +107 -0
  5. dnt-0.3.1.3/dnt/analysis/interaction.py → dnt-0.3.1.7/dnt/analysis/interaction2.py +23 -8
  6. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/analysis/stop3.py +7 -3
  7. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/detect/signal/detector.py +13 -4
  8. dnt-0.3.1.7/dnt/detect/timestamp.py +105 -0
  9. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/detect/yolov8/detector.py +72 -29
  10. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/detect/yolov8/segmentor.py +60 -2
  11. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/filter/filter.py +19 -8
  12. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/label/labeler2.py +170 -67
  13. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/synhcro.py +1 -1
  14. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/deep_sort.py +4 -3
  15. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/detection.py +2 -1
  16. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/track.py +2 -1
  17. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/tracker.py +1 -1
  18. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/dsort.py +34 -17
  19. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/re_class.py +29 -6
  20. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/sort/sort.py +4 -5
  21. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/tracker.py +9 -5
  22. {dnt-0.3.1.3 → dnt-0.3.1.7/dnt.egg-info}/PKG-INFO +13 -4
  23. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt.egg-info/SOURCES.txt +2 -1
  24. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt.egg-info/requires.txt +1 -2
  25. {dnt-0.3.1.3 → dnt-0.3.1.7}/setup.py +2 -3
  26. dnt-0.3.1.3/dnt/analysis/__init__.py +0 -8
  27. dnt-0.3.1.3/dnt/analysis/count.py +0 -90
  28. {dnt-0.3.1.3 → dnt-0.3.1.7}/LICENSE +0 -0
  29. {dnt-0.3.1.3 → dnt-0.3.1.7}/MANIFEST.in +0 -0
  30. {dnt-0.3.1.3 → dnt-0.3.1.7}/README.md +0 -0
  31. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/analysis/position.py +0 -0
  32. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/analysis/speed.py +0 -0
  33. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/analysis/stop.py +0 -0
  34. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/analysis/stop2.py +0 -0
  35. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/detect/__init__.py +0 -0
  36. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/detect/yolov8/__init__.py +0 -0
  37. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/engine/__init__.py +0 -0
  38. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/engine/bbox_interp.py +0 -0
  39. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/engine/bbox_iou.py +0 -0
  40. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/engine/cluster.py +0 -0
  41. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/engine/iob.py +0 -0
  42. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/filter/__init__.py +0 -0
  43. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/label/__init__.py +0 -0
  44. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/label/labeler.py +0 -0
  45. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/__init__.py +0 -0
  46. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/convert.py +0 -0
  47. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/data/coco.names +0 -0
  48. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/data/openimages.names +0 -0
  49. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/data/voc.names +0 -0
  50. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/download.py +0 -0
  51. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/files.py +0 -0
  52. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/filter.py +0 -0
  53. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/shared/util.py +0 -0
  54. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/__init__.py +0 -0
  55. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/checkpoint/__init__.py +0 -0
  56. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Base-AGW.yml +0 -0
  57. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Base-MGN.yml +0 -0
  58. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Base-SBS.yml +0 -0
  59. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Base-bagtricks.yml +0 -0
  60. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R101-ibn.yml +0 -0
  61. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R50-ibn.yml +0 -0
  62. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R50.yml +0 -0
  63. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/AGW_S50.yml +0 -0
  64. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R101-ibn.yml +0 -0
  65. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R50-ibn.yml +0 -0
  66. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R50.yml +0 -0
  67. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_S50.yml +0 -0
  68. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/mgn_R50-ibn.yml +0 -0
  69. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R101-ibn.yml +0 -0
  70. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R50-ibn.yml +0 -0
  71. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R50.yml +0 -0
  72. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/DukeMTMC/sbs_S50.yml +0 -0
  73. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/AGW_R101-ibn.yml +0 -0
  74. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/AGW_R50-ibn.yml +0 -0
  75. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/AGW_R50.yml +0 -0
  76. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/AGW_S50.yml +0 -0
  77. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/bagtricks_R101-ibn.yml +0 -0
  78. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/bagtricks_R50-ibn.yml +0 -0
  79. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/bagtricks_R50.yml +0 -0
  80. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/bagtricks_S50.yml +0 -0
  81. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/mgn_R50-ibn.yml +0 -0
  82. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/sbs_R101-ibn.yml +0 -0
  83. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/sbs_R50-ibn.yml +0 -0
  84. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/sbs_R50.yml +0 -0
  85. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT17/sbs_S50.yml +0 -0
  86. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/AGW_R101-ibn.yml +0 -0
  87. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/AGW_R50-ibn.yml +0 -0
  88. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/AGW_R50.yml +0 -0
  89. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/AGW_S50.yml +0 -0
  90. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/bagtricks_R101-ibn.yml +0 -0
  91. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/bagtricks_R50-ibn.yml +0 -0
  92. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/bagtricks_R50.yml +0 -0
  93. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/bagtricks_S50.yml +0 -0
  94. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/mgn_R50-ibn.yml +0 -0
  95. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/sbs_R101-ibn.yml +0 -0
  96. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/sbs_R50-ibn.yml +0 -0
  97. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/sbs_R50.yml +0 -0
  98. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MOT20/sbs_S50.yml +0 -0
  99. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/AGW_R101-ibn.yml +0 -0
  100. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/AGW_R50-ibn.yml +0 -0
  101. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/AGW_R50.yml +0 -0
  102. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/AGW_S50.yml +0 -0
  103. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R101-ibn.yml +0 -0
  104. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R50-ibn.yml +0 -0
  105. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R50.yml +0 -0
  106. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/bagtricks_S50.yml +0 -0
  107. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/mgn_R50-ibn.yml +0 -0
  108. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/sbs_R101-ibn.yml +0 -0
  109. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/sbs_R50-ibn.yml +0 -0
  110. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/sbs_R50.yml +0 -0
  111. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/MSMT17/sbs_S50.yml +0 -0
  112. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/AGW_R101-ibn.yml +0 -0
  113. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/AGW_R50-ibn.yml +0 -0
  114. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/AGW_R50.yml +0 -0
  115. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/AGW_S50.yml +0 -0
  116. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/bagtricks_R101-ibn.yml +0 -0
  117. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/bagtricks_R50-ibn.yml +0 -0
  118. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/bagtricks_R50.yml +0 -0
  119. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/bagtricks_S50.yml +0 -0
  120. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/bagtricks_vit.yml +0 -0
  121. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/mgn_R50-ibn.yml +0 -0
  122. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/sbs_R101-ibn.yml +0 -0
  123. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/sbs_R50-ibn.yml +0 -0
  124. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/sbs_R50.yml +0 -0
  125. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/Market1501/sbs_S50.yml +0 -0
  126. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/VERIWild/bagtricks_R50-ibn.yml +0 -0
  127. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/VeRi/sbs_R50-ibn.yml +0 -0
  128. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/VehicleID/bagtricks_R50-ibn.yml +0 -0
  129. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/configs/__init__.py +0 -0
  130. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fast_reid_interfece.py +0 -0
  131. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/__init__.py +0 -0
  132. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/config/__init__.py +0 -0
  133. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/config/config.py +0 -0
  134. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/config/defaults.py +0 -0
  135. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/__init__.py +0 -0
  136. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/build.py +0 -0
  137. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/common.py +0 -0
  138. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/data_utils.py +0 -0
  139. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/AirportALERT.py +0 -0
  140. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/__init__.py +0 -0
  141. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/bases.py +0 -0
  142. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/caviara.py +0 -0
  143. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/cuhk03.py +0 -0
  144. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/cuhk_sysu.py +0 -0
  145. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/dukemtmcreid.py +0 -0
  146. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/grid.py +0 -0
  147. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/iLIDS.py +0 -0
  148. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/lpw.py +0 -0
  149. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/market1501.py +0 -0
  150. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/msmt17.py +0 -0
  151. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/pes3d.py +0 -0
  152. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/pku.py +0 -0
  153. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/prai.py +0 -0
  154. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/prid.py +0 -0
  155. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/saivt.py +0 -0
  156. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/sensereid.py +0 -0
  157. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/shinpuhkan.py +0 -0
  158. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/sysu_mm.py +0 -0
  159. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/thermalworld.py +0 -0
  160. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/vehicleid.py +0 -0
  161. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/veri.py +0 -0
  162. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/veriwild.py +0 -0
  163. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/viper.py +0 -0
  164. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/datasets/wildtracker.py +0 -0
  165. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/samplers/__init__.py +0 -0
  166. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/samplers/data_sampler.py +0 -0
  167. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/samplers/imbalance_sampler.py +0 -0
  168. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/samplers/triplet_sampler.py +0 -0
  169. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/transforms/__init__.py +0 -0
  170. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/transforms/autoaugment.py +0 -0
  171. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/transforms/build.py +0 -0
  172. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/transforms/functional.py +0 -0
  173. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/data/transforms/transforms.py +0 -0
  174. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/engine/__init__.py +0 -0
  175. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/engine/defaults.py +0 -0
  176. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/engine/hooks.py +0 -0
  177. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/engine/launch.py +0 -0
  178. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/engine/train_loop.py +0 -0
  179. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/__init__.py +0 -0
  180. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/clas_evaluator.py +0 -0
  181. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/evaluator.py +0 -0
  182. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/query_expansion.py +0 -0
  183. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/rank.py +0 -0
  184. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/__init__.py +0 -0
  185. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/setup.py +0 -0
  186. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/test_cython.py +0 -0
  187. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/reid_evaluation.py +0 -0
  188. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/rerank.py +0 -0
  189. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/roc.py +0 -0
  190. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/evaluation/testing.py +0 -0
  191. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/__init__.py +0 -0
  192. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/activation.py +0 -0
  193. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/any_softmax.py +0 -0
  194. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/batch_norm.py +0 -0
  195. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/context_block.py +0 -0
  196. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/drop.py +0 -0
  197. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/frn.py +0 -0
  198. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/gather_layer.py +0 -0
  199. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/helpers.py +0 -0
  200. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/non_local.py +0 -0
  201. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/pooling.py +0 -0
  202. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/se_layer.py +0 -0
  203. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/splat.py +0 -0
  204. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/layers/weight_init.py +0 -0
  205. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/__init__.py +0 -0
  206. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/__init__.py +0 -0
  207. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/build.py +0 -0
  208. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/mobilenet.py +0 -0
  209. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/mobilenetv3.py +0 -0
  210. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/osnet.py +0 -0
  211. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/__init__.py +0 -0
  212. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/config.py +0 -0
  213. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B0_dds_8gpu.yaml +0 -0
  214. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B1_dds_8gpu.yaml +0 -0
  215. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B2_dds_8gpu.yaml +0 -0
  216. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B3_dds_8gpu.yaml +0 -0
  217. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B4_dds_8gpu.yaml +0 -0
  218. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B5_dds_8gpu.yaml +0 -0
  219. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet.py +0 -0
  220. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnet.py +0 -0
  221. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-1.6GF_dds_8gpu.yaml +0 -0
  222. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-12GF_dds_8gpu.yaml +0 -0
  223. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-16GF_dds_8gpu.yaml +0 -0
  224. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-200MF_dds_8gpu.yaml +0 -0
  225. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-3.2GF_dds_8gpu.yaml +0 -0
  226. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-32GF_dds_8gpu.yaml +0 -0
  227. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-4.0GF_dds_8gpu.yaml +0 -0
  228. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-400MF_dds_8gpu.yaml +0 -0
  229. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-6.4GF_dds_8gpu.yaml +0 -0
  230. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-600MF_dds_8gpu.yaml +0 -0
  231. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-8.0GF_dds_8gpu.yaml +0 -0
  232. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-800MF_dds_8gpu.yaml +0 -0
  233. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-1.6GF_dds_8gpu.yaml +0 -0
  234. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-12GF_dds_8gpu.yaml +0 -0
  235. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-16GF_dds_8gpu.yaml +0 -0
  236. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-200MF_dds_8gpu.yaml +0 -0
  237. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-3.2GF_dds_8gpu.yaml +0 -0
  238. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-32GF_dds_8gpu.yaml +0 -0
  239. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-4.0GF_dds_8gpu.yaml +0 -0
  240. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-400MF_dds_8gpu.yaml +0 -0
  241. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-6.4GF_dds_8gpu.yaml +0 -0
  242. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-600MF_dds_8gpu.yaml +0 -0
  243. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-8.0GF_dds_8gpu.yaml +0 -0
  244. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-800MF_dds_8gpu.yaml +0 -0
  245. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/repvgg.py +0 -0
  246. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/resnest.py +0 -0
  247. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/resnet.py +0 -0
  248. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/resnext.py +0 -0
  249. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/shufflenet.py +0 -0
  250. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/backbones/vision_transformer.py +0 -0
  251. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/heads/__init__.py +0 -0
  252. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/heads/build.py +0 -0
  253. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/heads/clas_head.py +0 -0
  254. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/heads/embedding_head.py +0 -0
  255. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/__init__.py +0 -0
  256. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/circle_loss.py +0 -0
  257. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/cross_entroy_loss.py +0 -0
  258. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/focal_loss.py +0 -0
  259. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/triplet_loss.py +0 -0
  260. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/losses/utils.py +0 -0
  261. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/__init__.py +0 -0
  262. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/baseline.py +0 -0
  263. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/build.py +0 -0
  264. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/distiller.py +0 -0
  265. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/mgn.py +0 -0
  266. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/modeling/meta_arch/moco.py +0 -0
  267. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/__init__.py +0 -0
  268. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/build.py +0 -0
  269. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/lr_scheduler.py +0 -0
  270. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/optim/__init__.py +0 -0
  271. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/optim/lamb.py +0 -0
  272. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/optim/radam.py +0 -0
  273. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/solver/optim/swa.py +0 -0
  274. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/__init__.py +0 -0
  275. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/checkpoint.py +0 -0
  276. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/collect_env.py +0 -0
  277. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/comm.py +0 -0
  278. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/compute_dist.py +0 -0
  279. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/env.py +0 -0
  280. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/events.py +0 -0
  281. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/faiss_utils.py +0 -0
  282. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/file_io.py +0 -0
  283. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/history_buffer.py +0 -0
  284. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/logger.py +0 -0
  285. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/params.py +0 -0
  286. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/precision_bn.py +0 -0
  287. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/registry.py +0 -0
  288. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/summary.py +0 -0
  289. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/timer.py +0 -0
  290. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/third_party/fast-reid/fastreid/utils/visualizer.py +0 -0
  291. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/__init__.py +0 -0
  292. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/__init__.py +0 -0
  293. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/__init__.py +0 -0
  294. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/basetrack.py +0 -0
  295. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/bot_sort.py +0 -0
  296. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/gmc.py +0 -0
  297. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/kalman_filter.py +0 -0
  298. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/matching.py +0 -0
  299. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/mc_bot_sort.py +0 -0
  300. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/tracking_utils/evaluation.py +0 -0
  301. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/tracking_utils/io.py +0 -0
  302. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/bot_tracker/tracking_utils/timer.py +0 -0
  303. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/botsort/inference.py +0 -0
  304. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/config.py +0 -0
  305. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/__init__.py +0 -0
  306. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/configs/bagtricks_R50.yml +0 -0
  307. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/configs/deep_sort.yaml +0 -0
  308. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/configs/fastreid.yaml +0 -0
  309. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/__init__.py +0 -0
  310. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/deep/__init__.py +0 -0
  311. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/deep/checkpoint/ckpt.t7 +0 -0
  312. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/deep/feature_extractor.py +0 -0
  313. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/deep/model.py +0 -0
  314. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/__init__.py +0 -0
  315. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/iou_matching.py +0 -0
  316. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/kalman_filter.py +0 -0
  317. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/linear_assignment.py +0 -0
  318. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/nn_matching.py +0 -0
  319. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/dsort/deep_sort/sort/preprocessing.py +0 -0
  320. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt/track/sort/__init__.py +0 -0
  321. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt.egg-info/dependency_links.txt +0 -0
  322. {dnt-0.3.1.3 → dnt-0.3.1.7}/dnt.egg-info/top_level.txt +0 -0
  323. {dnt-0.3.1.3 → dnt-0.3.1.7}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: dnt
3
- Version: 0.3.1.3
3
+ Version: 0.3.1.7
4
4
  Summary: A Python tool for video-based traffic analytiscs
5
5
  Home-page: https://its.cutr.usf.edu/dnt/
6
6
  Author: Zhenyu Wang
@@ -21,12 +21,11 @@ Requires-Dist: cython
21
21
  Requires-Dist: cython_bbox
22
22
  Requires-Dist: easydict
23
23
  Requires-Dist: faiss-cpu
24
- Requires-Dist: faiss-gpu
25
24
  Requires-Dist: filterpy
26
25
  Requires-Dist: gdown
27
26
  Requires-Dist: geopandas
28
27
  Requires-Dist: h5py
29
- Requires-Dist: lap
28
+ Requires-Dist: lapx
30
29
  Requires-Dist: loguru
31
30
  Requires-Dist: matplotlib
32
31
  Requires-Dist: motmetrics
@@ -52,3 +51,13 @@ Requires-Dist: thop
52
51
  Requires-Dist: tqdm
53
52
  Requires-Dist: vidgear
54
53
  Requires-Dist: yacs
54
+ Dynamic: author
55
+ Dynamic: author-email
56
+ Dynamic: classifier
57
+ Dynamic: home-page
58
+ Dynamic: keywords
59
+ Dynamic: license
60
+ Dynamic: license-file
61
+ Dynamic: requires-dist
62
+ Dynamic: requires-python
63
+ Dynamic: summary
@@ -2,4 +2,4 @@ import sys, os
2
2
  sys.path.append(os.path.dirname(__file__))
3
3
  sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party/fast-reid'))
4
4
 
5
- __version__='0.3.1.3'
5
+ __version__='0.3.1.7'
@@ -0,0 +1,8 @@
1
+ import os
2
+ import sys
3
+
4
+ sys.path.append(os.path.dirname(__file__))
5
+
6
+ from stop3 import StopAnalyzer
7
+ from count import Count
8
+ from interaction2 import YieldAnalyzer
@@ -0,0 +1,107 @@
1
+ # pylint: disable=too-many-arguments
2
+ '''
3
+ This script is used to count the number of tracks that passing a reference line for post-analysis
4
+ last modified: 2021-09-30
5
+ '''
6
+ from shapely.geometry import Polygon, LineString
7
+ import geopandas as gpd
8
+ import pandas as pd
9
+ from tqdm import tqdm
10
+ import numpy as np
11
+
12
+ class Count:
13
+ '''
14
+ Count tracks that passing a reference line for post-analysis
15
+ Methods:
16
+ __init__(): initialize the class
17
+ count_tracks_by_line():
18
+ count tracks that passing a reference line for post-analysis
19
+ '''
20
+ def __init__(self) -> None:
21
+ self.track_fields = ['frame', 'track_id', 'x', 'y', 'w', 'h', 'r1', 'r2', 'r3', 'r4']
22
+
23
+ def count_tracks_by_line(self,
24
+ tracks:pd.DataFrame=None,
25
+ track_file:str=None,
26
+ line: LineString=None,
27
+ video_index:int=None,
28
+ video_tot:int=None,
29
+ verbose:bool=True) -> pd.DataFrame:
30
+ '''
31
+ Count tracks that passing a reference line for post-analysis
32
+ Inputs:
33
+ tracks - a DataFrame of tracks, if None (default), read track_file
34
+ track_file - a txt file contains tracks,
35
+ line - the reference line, LineString(pointA, pointB)
36
+ video_index - the index of video for processing
37
+ video_tot - the total number of videos
38
+ verbose - if True, show progress bar
39
+ Return:
40
+ A DataFrame of track_id, frame, direction, count
41
+ '''
42
+ # Load tracks
43
+ if tracks is None:
44
+ tracks = pd.read_csv(track_file, header=None)
45
+ if len(tracks.columns) != len(self.track_fields):
46
+ raise Exception("The tracks format is incorrect!")
47
+ tracks.columns = self.track_fields
48
+ track_ids = tracks['track_id'].unique()
49
+
50
+ # Create a GeoDataFrame of tracks
51
+ geo = tracks.apply(lambda track: Polygon([(track['x'], track['y']),
52
+ (track['x'] + track['w'], track['y']),
53
+ (track['x'] + track['w'], track['y'] + track['h']),
54
+ (track['x'], track['y'] + track['h'])]),
55
+ axis =1)
56
+ geo_tracks = gpd.GeoDataFrame(tracks, geometry=geo)
57
+ point_a = np.array(line.coords[0])
58
+ point_b = np.array(line.coords[1])
59
+
60
+ # Interate through all tracks
61
+ if verbose:
62
+ pbar = tqdm(total=len(track_ids), unit=' tracks')
63
+ if video_index and video_tot:
64
+ pbar.set_description_str("Counting {} of {}".format(video_index, video_tot))
65
+ else:
66
+ pbar.set_description_str("Counting")
67
+ intersected_tracks = []
68
+ intersected_frames = []
69
+ intersected_direct = []
70
+
71
+ for track_id in track_ids:
72
+ selected = geo_tracks.loc[(geo_tracks['track_id']==track_id)].copy()
73
+ if len(selected)>0:
74
+ selected['intersected'] = line.intersects(selected.geometry).values.tolist()
75
+ intersected = selected.loc[(selected['intersected']==True)].copy()
76
+ if len(intersected) > 0:
77
+ intersected.sort_values(by='frame', inplace=True)
78
+ if not track_id in intersected_tracks:
79
+ intersected_tracks.append(track_id)
80
+ frame_pos = int(len(intersected)/2)
81
+ intersected_frames.append(intersected['frame'].values[frame_pos])
82
+
83
+ # center point of the first frame
84
+ point_c = np.array((intersected.iloc[0]['x'] + intersected.iloc[0]['w']/2,
85
+ intersected.iloc[0]['y'] + intersected.iloc[0]['h']/2))
86
+ d = 2 # right
87
+ if np.cross(point_c-point_a, point_b-point_a) < 0:
88
+ d = 1 # left
89
+ intersected_direct.append(d)
90
+ if verbose:
91
+ pbar.update()
92
+
93
+ if verbose:
94
+ pbar.close()
95
+
96
+ results = pd.DataFrame(
97
+ {
98
+ 'track_id': intersected_tracks,
99
+ 'frame': intersected_frames,
100
+ 'direction': intersected_direct,
101
+ }
102
+ )
103
+ results.sort_values(by='frame', inplace=True)
104
+ results = results.reset_index(drop=True)
105
+ results['count'] = results.index + 1
106
+
107
+ return results
@@ -1,21 +1,36 @@
1
+ """
2
+ This module is used to analyze the interaction between two tracks.
3
+ Author: Zhenyu Wang
4
+ Date: 2023/10/20
5
+ Email: wonstran@hotmail.com
6
+ Updates:
7
+ 2025/03/19: Add the function of nearmiss based on PET
8
+ 2023/10/20: Initial version
9
+ """
1
10
  from shapely.geometry import Point, Polygon, LineString, box
2
11
  from shapely import intersection, distance, intersects
3
12
  from shapelysmooth import taubin_smooth, chaikin_smooth, catmull_rom_smooth
4
13
  import geopandas as gpd, pandas as pd
5
14
  from tqdm import tqdm
6
15
  import numpy as np
7
- from matplotlib import pyplot as plt
8
16
  from dnt.label.labeler2 import Labeler
9
17
  import os
10
- from ..track import Tracker
11
18
 
12
19
  class YieldAnalyzer:
13
- def __init__(self, waiting_dist_p:int=600, waiting_dist_y:int=300,
14
- leading_p:bool=False, leading_axis_p:str='y',
15
- leading_y:bool=True, leading_axis_y:str='x',
16
- yield_gap:int=10, fps:int=30, ref_point='bc',
17
- ref_offset:tuple=(0,0), filter_buffer:int=0,
18
- p_zone:Polygon=None, y_zone:Polygon=None) -> None:
20
+ def __init__(self,
21
+ waiting_dist_p:int=600,
22
+ waiting_dist_y:int=300,
23
+ leading_p:bool=False,
24
+ leading_axis_p:str='y',
25
+ leading_y:bool=True,
26
+ leading_axis_y:str='x',
27
+ yield_gap:int=10,
28
+ fps:int=30,
29
+ ref_point='bc',
30
+ ref_offset:tuple=(0,0),
31
+ filter_buffer:int=0,
32
+ p_zone:Polygon=None,
33
+ y_zone:Polygon=None) -> None:
19
34
  '''
20
35
  Parameters:
21
36
  threshold: the hyperparameter to determine if a yield event (frame difference <=yield_gap*fps), default is 3 seconds
@@ -6,11 +6,15 @@ from tqdm import tqdm
6
6
  from cython_bbox import bbox_overlaps
7
7
  import numpy as np
8
8
  #import mapply
9
- from ..filter import Filter
9
+ import sys
10
+ import os
11
+ sys.path.append(os.path.dirname(__file__))
12
+ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
13
+ from filter import Filter
10
14
  from matplotlib import pyplot as plt
11
15
  import random, os
12
- from ..label.labeler2 import Labeler
13
- from ..engine.bbox_iou import ious
16
+ from label.labeler2 import Labeler
17
+ from engine.bbox_iou import ious
14
18
 
15
19
  class StopAnalyzer():
16
20
  def __init__(self,
@@ -12,19 +12,27 @@ import torchvision.transforms as transforms
12
12
  from torchvision.models.resnet import ResNet18_Weights
13
13
  from shared.download import download_file
14
14
  from matplotlib import pyplot as plt
15
+ from ultralytics import YOLO
15
16
 
16
17
  class Model(nn.Module):
17
- def __init__(self):
18
+ def __init__(self, num_class=2):
18
19
  super(Model, self).__init__()
19
20
 
20
21
  self.resnet18 = models.resnet18(weights=ResNet18_Weights.DEFAULT)
21
- self.resnet18.fc = nn.Linear(512, 2)
22
+ self.resnet18.fc = nn.Linear(512, num_class)
22
23
 
23
24
  def forward(self, x):
24
25
  return self.resnet18(x)
25
26
 
26
27
  class SignalDetector:
27
- def __init__(self, det_zones:list, model:str='ped', weights:str=None, batchsz:int=64, threshold:float=0.98, device='auto'):
28
+ def __init__(self,
29
+ det_zones:list,
30
+ model:str='ped',
31
+ weights:str=None,
32
+ batchsz:int=64,
33
+ num_class:int=2,
34
+ threshold:float=0.98,
35
+ device='auto'):
28
36
  '''
29
37
  Detect traffic signal status
30
38
 
@@ -33,6 +41,7 @@ class SignalDetector:
33
41
  - model: detection model, default is 'ped', 'custom'
34
42
  - weights: path of weights, default is None
35
43
  - batchsz: the batch size for prediction, default is 64
44
+ - num_class: the number of classes, default is 2
36
45
  - threshold: the threshold for detection, default is 0.98
37
46
  '''
38
47
 
@@ -47,7 +56,7 @@ class SignalDetector:
47
56
  url = 'https://its.cutr.usf.edu/alms/downloads/ped_signal.pt'
48
57
  download_file(url, weights)
49
58
 
50
- self.model = Model()
59
+ self.model = Model(num_class)
51
60
  if device == 'auto':
52
61
  self.device = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu'
53
62
  elif device == 'cuda' and torch.cuda.is_available():
@@ -0,0 +1,105 @@
1
+ import easyocr
2
+ import cv2
3
+ import numpy as np
4
+ import dateparser
5
+ from datetime import datetime
6
+
7
+ class TimestampExtractor:
8
+ def __init__(self,
9
+ zone:np.ndarray=None,
10
+ allowlist='0123456789-:/'):
11
+ """
12
+ args:
13
+ zone (np.ndarray): The coordinates of the timestamp area in the image.
14
+ allowlist (str): Characters to allow in the OCR process.
15
+ """
16
+ self.zone = zone
17
+ self.reader = easyocr.Reader(['en'])
18
+ self.allowlist = allowlist
19
+
20
+ def extract_timestamp(self,
21
+ img:np.ndarray,
22
+ gray:bool=False,
23
+ ) -> datetime:
24
+ """
25
+ Extract timestamp from the image using OCR.
26
+ args:
27
+ img (np.ndarray): The input image from which to extract the timestamp.
28
+ returns:
29
+ datetime: The extracted timestamp.
30
+ """
31
+ # Ensure the zone is a numpy array
32
+ if self.zone is None:
33
+ crop_img = img
34
+ else:
35
+ x1, y1, x2, y2 = self.zone[0][0], self.zone[0][1], self.zone[2][0], self.zone[2][1]
36
+ crop_img = img[y1:y2, x1:x2]
37
+
38
+ if gray:
39
+ crop_img = cv2.cvtColor(crop_img, cv2.COLOR_BGR2GRAY)
40
+ else:
41
+ crop_img = crop_img
42
+
43
+ result = self.reader.readtext(crop_img, detail=0, allowlist='0123456789-:/')
44
+ dt = dateparser.parse(" ".join(result))
45
+ return dt
46
+
47
+ def extract_timestamp_video(self,
48
+ video_path:str,
49
+ frame:int=0,
50
+ gray:bool=False,
51
+ ) -> datetime:
52
+ """
53
+ Extract timestamp from a video file using OCR.
54
+ args:
55
+ video_path (str): The path to the video file.
56
+ frame (int): The frame index to extract the timestamp from.
57
+ gray (bool): Whether to convert the image to grayscale before OCR.
58
+ returns:
59
+ datetime: The extracted timestamp.
60
+ """
61
+ cap = cv2.VideoCapture(video_path)
62
+ cap.set(cv2.CAP_PROP_POS_FRAMES, frame)
63
+ ret, img = cap.read()
64
+ cap.release()
65
+
66
+ if not ret:
67
+ raise ValueError("Could not read video file")
68
+
69
+ return self.extract_timestamp(img, gray=gray)
70
+
71
+ def extract_timestamp_video_auto(self,
72
+ video_path:str,
73
+ gray:bool=False,
74
+ ) -> tuple:
75
+ """
76
+ Extract the initial timestamp from the first readable frame in a video file using OCR.
77
+ args:
78
+ video_path (str): The path to the video file.
79
+ gray (bool): Whether to convert the image to grayscale before OCR.
80
+ returns:
81
+ dt, frame: The extracted timestamp and the frame index.
82
+ """
83
+ cap = cv2.VideoCapture(video_path)
84
+ cap.set(cv2.CAP_PROP_POS_FRAMES, 0)
85
+ tot = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))
86
+
87
+ for frame in range(0, tot-1):
88
+ ret, img = cap.read()
89
+ if not ret:
90
+ break
91
+ dt = self.extract_timestamp(img, gray=gray)
92
+ if dt:
93
+ cap.release()
94
+ return dt, frame
95
+
96
+ cap.release()
97
+ return None, None
98
+
99
+ if __name__ == "__main__":
100
+ img = cv2.imread('/mnt/d/videos/sample/frames/007_day.png')
101
+ zone = np.array([[62, 1003], [543, 1000], [547, 1059], [67, 1061]])
102
+ extractor = TimestampExtractor(zone=zone)
103
+ timestamp = extractor.extract_timestamp(img)
104
+ print("Extracted Timestamp:")
105
+ print(timestamp)
@@ -1,3 +1,6 @@
1
+ '''
2
+ This module is a wrapper for ultralytics YOLOV8 and RTDETR models.
3
+ '''
1
4
  from ultralytics import YOLO, RTDETR
2
5
  import cv2
3
6
  import pandas as pd
@@ -7,21 +10,38 @@ from pathlib import Path
7
10
  import torch
8
11
 
9
12
  class Detector:
10
- def __init__(self, model:str='yolo', weights:str='x', conf:float=0.25, nms:float=0.7, max_det:int=300,
11
- device:str='auto', half:bool=False):
13
+ def __init__(self,
14
+ model:str='yolo',
15
+ weights:str='x',
16
+ conf:float=0.25,
17
+ nms:float=0.7,
18
+ max_det:int=300,
19
+ device:str='auto',
20
+ half:bool=False):
12
21
  '''
13
- model: 'yolo' (default), 'rtdetr'
14
- weights: 'x' - extra-large (default), 'l' - large, 'm' - mdium, 's' - small, 'n' - nano, '.pt' - custom model weights
15
- device: 'auto' (default), 'cuda', 'cpu', 'mps'
16
- half: False (default), True
22
+ Initialize the Detector class.
23
+ Parameters:
24
+ model: 'yolo' (default), 'rtdetr'
25
+ weights: 'x' - extra-large (default), 'l' - large, 'm' - mdium, 's' - small, 'n' - nano, '.pt' - custom model weights
26
+ conf: 0.25 (default) - confidence threshold
27
+ nms: 0.7 (default) - non-max suppression threshold
28
+ max_det: 300 (default) - maximum number of detections per image
29
+ device: 'auto' (default), 'cuda', 'cpu', 'mps'
30
+ half: False (default), True
17
31
  '''
18
- # Load YOLOV8 model
32
+ # Load model
19
33
  cwd = Path(__file__).parent.absolute()
20
34
  if model == 'yolo':
21
35
  if weights in ['x', 'l', 'm', 's', 'n']:
22
36
  model_path = os.path.join(cwd, 'models/yolov8'+weights+'.pt')
23
37
  elif ".pt" in weights:
24
38
  model_path = os.path.join(cwd, 'models/'+weights)
39
+ elif model == 'yolo11':
40
+ if weights in ['x', 'l', 'm', 's', 'n']:
41
+ model_path = os.path.join(cwd, 'models/yolo11'+weights+'.pt')
42
+ elif ".pt" in weights:
43
+ model_path = os.path.join(cwd, 'models/'+weights)
44
+
25
45
  elif model == 'rtdetr':
26
46
  if weights in ['x', 'l']:
27
47
  model_path = os.path.join(cwd, 'models/rtdetr-'+weights+'.pt')
@@ -39,7 +59,7 @@ class Detector:
39
59
  else:
40
60
  raise Exception('Invalid detection model type!')
41
61
 
42
- if model == 'yolo':
62
+ if model == 'yolo' or model == 'yolo11':
43
63
  self.model = YOLO(model_path)
44
64
  elif model == 'rtdetr':
45
65
  self.model = RTDETR(model_path)
@@ -63,10 +83,27 @@ class Detector:
63
83
 
64
84
  self.half = half
65
85
 
66
- def detect(self, input_video:str, iou_file:str=None,
67
- video_index:int=None, video_tot:int=None,
68
- start_time:int=None, end_time:int=None, verbose:bool=False) -> pd.DataFrame:
69
-
86
+ def detect(self,
87
+ input_video:str,
88
+ iou_file:str=None,
89
+ video_index:int=None,
90
+ video_tot:int=None,
91
+ start_frame:int=None,
92
+ end_frame:int=None,
93
+ verbose:bool=True) -> pd.DataFrame:
94
+ '''
95
+ Detect objects in a video file.
96
+ Parameters:
97
+ input_video: path to the input video file
98
+ iou_file: path to the output file
99
+ video_index: index of the video in the batch
100
+ video_tot: total number of videos in the batch
101
+ start_frame: start frame number
102
+ end_frame: end frame number
103
+ verbose: True (default), False
104
+ Returns:
105
+ df: pandas DataFrame containing the detection results
106
+ '''
70
107
  # open input video
71
108
  cap = cv2.VideoCapture(input_video)
72
109
  if not cap.isOpened():
@@ -76,16 +113,14 @@ class Detector:
76
113
  results = []
77
114
 
78
115
  video_fps = int(cap.get(cv2.CAP_PROP_FPS)) #original fps
79
- if start_time:
80
- start_frame = int(video_fps * start_time)
81
- if start_frame > int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1:
116
+ if start_frame:
117
+ if (start_frame > int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1) or (start_frame < 0):
82
118
  start_frame = 0
83
119
  else:
84
120
  start_frame = 0
85
121
 
86
- if end_time:
87
- end_frame = int(video_fps * end_time)
88
- if end_frame > int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1:
122
+ if end_frame:
123
+ if (end_frame > int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1) or (end_frame < 0):
89
124
  end_frame = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1
90
125
  else:
91
126
  end_frame = int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1
@@ -93,12 +128,13 @@ class Detector:
93
128
  if start_frame>=end_frame:
94
129
  raise Exception('The given start time exceeds the end time!')
95
130
 
96
- frame_total = end_frame - start_frame
97
- pbar = tqdm(total=frame_total, unit=" frames")
98
- if video_index and video_tot:
99
- pbar.set_description_str("Detecting {} of {}".format(video_index, video_tot))
100
- else:
101
- pbar.set_description_str("Detecting ")
131
+ frame_total = end_frame - start_frame
132
+ if verbose:
133
+ pbar = tqdm(total=frame_total, unit=" frames")
134
+ if video_index and video_tot:
135
+ pbar.set_description_str("Detecting {} of {}".format(video_index, video_tot))
136
+ else:
137
+ pbar.set_description_str("Detecting ")
102
138
 
103
139
  cap.set(cv2.CAP_PROP_POS_FRAMES, start_frame)
104
140
  while cap.isOpened():
@@ -120,9 +156,11 @@ class Detector:
120
156
  result.insert(1, 'res', -1)
121
157
  results.append(result)
122
158
 
123
- pbar.update()
159
+ if verbose:
160
+ pbar.update()
124
161
 
125
- pbar.close()
162
+ if verbose:
163
+ pbar.close()
126
164
  cap.release()
127
165
  #cv2.destroyAllWindows()
128
166
 
@@ -179,7 +217,11 @@ class Detector:
179
217
  pbar.close()
180
218
  cap.release()
181
219
 
182
- df = pd.concat(results)
220
+ if len(results) == 0:
221
+ return pd.DataFrame(columns=['frame', 'res', 'x', 'y', 'w', 'h', 'conf', 'class'])
222
+
223
+ df = pd.concat(d for d in results if not d.empty) # remove empty dataframes
224
+ #df = pd.concat(results)
183
225
  df['x'] = round(df['x'], 1)
184
226
  df['y'] = round(df['y'], 1)
185
227
  df['w'] = round(df['x2']-df['x'], 0)
@@ -271,6 +313,7 @@ class Detector:
271
313
 
272
314
  if __name__=='__main__':
273
315
 
274
- detector = Detector()
275
- result = detector.detect_frames('/mnt/d/videos/samples/traffic_short.mp4', [0, 1])
316
+ detector = Detector(model='yolo11')
317
+ result = detector.detect('/mnt/d/videos/sample/traffic.mp4', verbose=True)
318
+
276
319
  print(result)
@@ -4,15 +4,18 @@ import pandas as pd
4
4
  from tqdm import tqdm
5
5
  import random, os, json
6
6
  from pathlib import Path
7
+ import torch
8
+ from shapely.geometry import Polygon as Pol
7
9
 
8
10
  class Segmentor:
9
- def __init__(self, model:str='yolov8x-seg.pt', conf:float=0.25, nms:float=0.7, max_det:int=300, half:bool=False):
11
+ def __init__(self, model:str='yolov8m-seg.pt', conf:float=0.25, nms:float=0.7, max_det:int=300, device:str='auto', half:bool=False):
10
12
  '''
11
13
  yolo: x - yolov8x-seg.pt
12
14
  l - yolov8l-seg.pt
13
15
  m - yolov8m-seg.pt
14
16
  s - yolov8s-seg.pt
15
17
  n - yolov8n-seg.pt
18
+
16
19
  '''
17
20
  # Load YOLOV8 model
18
21
  cwd = Path(__file__).parent.absolute()
@@ -21,6 +24,17 @@ class Segmentor:
21
24
  self.conf = conf
22
25
  self.nms = nms
23
26
  self.max_det = max_det
27
+
28
+ if device == 'auto':
29
+ self.device = 'cuda' if torch.cuda.is_available() else 'mps' if torch.backends.mps.is_available() else 'cpu'
30
+ elif device == 'cuda' and torch.cuda.is_available():
31
+ self.device = 'cuda'
32
+ elif device == 'mps' and torch.backends.mps.is_available():
33
+ self.device = 'mps'
34
+ else:
35
+ self.device = 'cpu'
36
+
37
+ self.half = half
24
38
  self.half = half
25
39
 
26
40
  def segment(self, input_video:str, mask_file:str=None,
@@ -106,8 +120,52 @@ class Segmentor:
106
120
  video_index=None, video_tot=None,
107
121
  start_frame=frame, end_frame=frame,
108
122
  verbose=False)
123
+
124
+ def segment_zone(self, input_video:str, frame:int=None, zone:list=None) -> list:
125
+ '''
126
+ Segment the video in a specific zone
127
+ input_video: Path to video
128
+ frame: Frame number to segment
129
+ zone: Polygon zone to segment
130
+ Return:
131
+ List of segmented objects in the zone
132
+ '''
133
+
134
+ # open input video
135
+ cap = cv2.VideoCapture(input_video)
136
+ if not cap.isOpened():
137
+ print('Failed to open the video!')
109
138
 
139
+ if frame <0 or frame > int(cap.get(cv2.CAP_PROP_FRAME_COUNT))-1:
140
+ raise Exception('The given frame is out of range!')
141
+
142
+ cap.set(cv2.CAP_PROP_POS_FRAMES, frame)
143
+ ret, frame = cap.read()
144
+ if ret:
145
+ x1, y1, x2, y2 = zone
146
+ cropped_frame = frame[y1:y2, x1:x2]
147
+ detects = self.model.predict(cropped_frame, verbose=False, conf=self.conf, iou=self.nms, max_det=self.max_det, half=self.half)
148
+ if len(detects)>0:
149
+ if detects[0].masks is not None:
150
+ xy = list(map(lambda x: x.tolist(), detects[0].masks.xy))
151
+ print(xy)
152
+ input('.')
153
+ cap.release()
154
+
155
+
110
156
  if __name__=="__main__":
111
157
 
112
158
  segmentor = Segmentor()
113
- segmentor.segment('/mnt/d/videos/samples/traffic_short.mp4', '/mnt/d/videos/samples/traffic_short_mask.json', start_frame=1, end_frame=1)
159
+ #segmentor.segment('/mnt/d/videos/samples/traffic_short.mp4', '/mnt/d/videos/samples/traffic_short_mask.json', start_frame=1, end_frame=1)
160
+ input_video = '/mnt/d/videos/hyde/after_2024-08-15_nw.mp4'
161
+ tracks = pd.read_csv('/mnt/d/videos/hyde/tracks/after_2024-08-15_nw_track_veh_rt.txt')
162
+ tracks.columns = ['frame', 'track', 'x', 'y', 'w', 'h', 'r1', 'r2', 'r3', 'r4']
163
+ dets = tracks[tracks['track'] == 678]
164
+ dets.sort_values(by='frame', inplace=True)
165
+
166
+ for index, det in dets.iterrows():
167
+ zone = (int(det['x']), int(det['y']), int(det['x'] + det['w']), int(det['y'] + det['h']))
168
+ frame = int(det['frame'])
169
+
170
+ segmentor.segment_zone(input_video, frame, zone) # Segment the specific zone
171
+ print(f"Segmented frame {frame}")