dnt 0.2.4__py3-none-any.whl → 0.3.1.7__py3-none-any.whl
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.
Potentially problematic release.
This version of dnt might be problematic. Click here for more details.
- dnt/__init__.py +3 -2
- dnt/analysis/__init__.py +3 -2
- dnt/analysis/count.py +54 -37
- dnt/analysis/interaction2.py +518 -0
- dnt/analysis/stop.py +22 -17
- dnt/analysis/stop2.py +289 -0
- dnt/analysis/stop3.py +758 -0
- dnt/detect/signal/detector.py +326 -0
- dnt/detect/timestamp.py +105 -0
- dnt/detect/yolov8/detector.py +179 -36
- dnt/detect/yolov8/segmentor.py +60 -2
- dnt/engine/__init__.py +8 -0
- dnt/engine/bbox_interp.py +83 -0
- dnt/engine/bbox_iou.py +20 -0
- dnt/engine/cluster.py +31 -0
- dnt/engine/iob.py +66 -0
- dnt/filter/filter.py +333 -2
- dnt/label/labeler.py +4 -4
- dnt/label/labeler2.py +605 -0
- dnt/shared/__init__.py +2 -1
- dnt/shared/data/coco.names +0 -0
- dnt/shared/data/openimages.names +0 -0
- dnt/shared/data/voc.names +0 -0
- dnt/shared/download.py +12 -0
- dnt/shared/synhcro.py +150 -0
- dnt/shared/util.py +17 -4
- dnt/third_party/fast-reid/__init__.py +1 -0
- dnt/third_party/fast-reid/configs/Base-AGW.yml +19 -0
- dnt/third_party/fast-reid/configs/Base-MGN.yml +12 -0
- dnt/third_party/fast-reid/configs/Base-SBS.yml +63 -0
- dnt/third_party/fast-reid/configs/Base-bagtricks.yml +76 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/AGW_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/AGW_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/bagtricks_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/mgn_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/sbs_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/DukeMTMC/sbs_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/AGW_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT17/AGW_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/AGW_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT17/AGW_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/bagtricks_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT17/bagtricks_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/bagtricks_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT17/bagtricks_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/mgn_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/sbs_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT17/sbs_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT17/sbs_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT17/sbs_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/AGW_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT20/AGW_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/AGW_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT20/AGW_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/bagtricks_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT20/bagtricks_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/bagtricks_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT20/bagtricks_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/mgn_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/sbs_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MOT20/sbs_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MOT20/sbs_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MOT20/sbs_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MSMT17/AGW_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MSMT17/AGW_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MSMT17/AGW_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MSMT17/AGW_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R101-ibn.yml +13 -0
- dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R50-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MSMT17/bagtricks_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MSMT17/bagtricks_S50.yml +12 -0
- dnt/third_party/fast-reid/configs/MSMT17/mgn_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MSMT17/sbs_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/MSMT17/sbs_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/MSMT17/sbs_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/MSMT17/sbs_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/AGW_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/Market1501/AGW_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/AGW_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/Market1501/AGW_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/bagtricks_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/Market1501/bagtricks_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/bagtricks_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/Market1501/bagtricks_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/bagtricks_vit.yml +88 -0
- dnt/third_party/fast-reid/configs/Market1501/mgn_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/sbs_R101-ibn.yml +12 -0
- dnt/third_party/fast-reid/configs/Market1501/sbs_R50-ibn.yml +11 -0
- dnt/third_party/fast-reid/configs/Market1501/sbs_R50.yml +7 -0
- dnt/third_party/fast-reid/configs/Market1501/sbs_S50.yml +11 -0
- dnt/third_party/fast-reid/configs/VERIWild/bagtricks_R50-ibn.yml +35 -0
- dnt/third_party/fast-reid/configs/VeRi/sbs_R50-ibn.yml +35 -0
- dnt/third_party/fast-reid/configs/VehicleID/bagtricks_R50-ibn.yml +36 -0
- dnt/third_party/fast-reid/configs/__init__.py +0 -0
- dnt/third_party/fast-reid/fast_reid_interfece.py +175 -0
- dnt/third_party/fast-reid/fastreid/__init__.py +6 -0
- dnt/third_party/fast-reid/fastreid/config/__init__.py +15 -0
- dnt/third_party/fast-reid/fastreid/config/config.py +319 -0
- dnt/third_party/fast-reid/fastreid/config/defaults.py +329 -0
- dnt/third_party/fast-reid/fastreid/data/__init__.py +17 -0
- dnt/third_party/fast-reid/fastreid/data/build.py +194 -0
- dnt/third_party/fast-reid/fastreid/data/common.py +58 -0
- dnt/third_party/fast-reid/fastreid/data/data_utils.py +202 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/AirportALERT.py +50 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/__init__.py +43 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/bases.py +183 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/caviara.py +44 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/cuhk03.py +274 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/cuhk_sysu.py +58 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/dukemtmcreid.py +70 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/grid.py +44 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/iLIDS.py +45 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/lpw.py +49 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/market1501.py +89 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/msmt17.py +114 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/pes3d.py +44 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/pku.py +44 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/prai.py +43 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/prid.py +41 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/saivt.py +47 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/sensereid.py +47 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/shinpuhkan.py +48 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/sysu_mm.py +47 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/thermalworld.py +43 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/vehicleid.py +126 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/veri.py +69 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/veriwild.py +140 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/viper.py +45 -0
- dnt/third_party/fast-reid/fastreid/data/datasets/wildtracker.py +59 -0
- dnt/third_party/fast-reid/fastreid/data/samplers/__init__.py +18 -0
- dnt/third_party/fast-reid/fastreid/data/samplers/data_sampler.py +85 -0
- dnt/third_party/fast-reid/fastreid/data/samplers/imbalance_sampler.py +67 -0
- dnt/third_party/fast-reid/fastreid/data/samplers/triplet_sampler.py +260 -0
- dnt/third_party/fast-reid/fastreid/data/transforms/__init__.py +11 -0
- dnt/third_party/fast-reid/fastreid/data/transforms/autoaugment.py +806 -0
- dnt/third_party/fast-reid/fastreid/data/transforms/build.py +100 -0
- dnt/third_party/fast-reid/fastreid/data/transforms/functional.py +180 -0
- dnt/third_party/fast-reid/fastreid/data/transforms/transforms.py +161 -0
- dnt/third_party/fast-reid/fastreid/engine/__init__.py +15 -0
- dnt/third_party/fast-reid/fastreid/engine/defaults.py +490 -0
- dnt/third_party/fast-reid/fastreid/engine/hooks.py +534 -0
- dnt/third_party/fast-reid/fastreid/engine/launch.py +103 -0
- dnt/third_party/fast-reid/fastreid/engine/train_loop.py +357 -0
- dnt/third_party/fast-reid/fastreid/evaluation/__init__.py +6 -0
- dnt/third_party/fast-reid/fastreid/evaluation/clas_evaluator.py +81 -0
- dnt/third_party/fast-reid/fastreid/evaluation/evaluator.py +176 -0
- dnt/third_party/fast-reid/fastreid/evaluation/query_expansion.py +46 -0
- dnt/third_party/fast-reid/fastreid/evaluation/rank.py +200 -0
- dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/__init__.py +20 -0
- dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/setup.py +32 -0
- dnt/third_party/fast-reid/fastreid/evaluation/rank_cylib/test_cython.py +106 -0
- dnt/third_party/fast-reid/fastreid/evaluation/reid_evaluation.py +143 -0
- dnt/third_party/fast-reid/fastreid/evaluation/rerank.py +73 -0
- dnt/third_party/fast-reid/fastreid/evaluation/roc.py +90 -0
- dnt/third_party/fast-reid/fastreid/evaluation/testing.py +88 -0
- dnt/third_party/fast-reid/fastreid/layers/__init__.py +19 -0
- dnt/third_party/fast-reid/fastreid/layers/activation.py +59 -0
- dnt/third_party/fast-reid/fastreid/layers/any_softmax.py +80 -0
- dnt/third_party/fast-reid/fastreid/layers/batch_norm.py +205 -0
- dnt/third_party/fast-reid/fastreid/layers/context_block.py +113 -0
- dnt/third_party/fast-reid/fastreid/layers/drop.py +161 -0
- dnt/third_party/fast-reid/fastreid/layers/frn.py +199 -0
- dnt/third_party/fast-reid/fastreid/layers/gather_layer.py +30 -0
- dnt/third_party/fast-reid/fastreid/layers/helpers.py +31 -0
- dnt/third_party/fast-reid/fastreid/layers/non_local.py +54 -0
- dnt/third_party/fast-reid/fastreid/layers/pooling.py +124 -0
- dnt/third_party/fast-reid/fastreid/layers/se_layer.py +25 -0
- dnt/third_party/fast-reid/fastreid/layers/splat.py +109 -0
- dnt/third_party/fast-reid/fastreid/layers/weight_init.py +122 -0
- dnt/third_party/fast-reid/fastreid/modeling/__init__.py +23 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/__init__.py +18 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/build.py +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/mobilenet.py +195 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/mobilenetv3.py +283 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/osnet.py +525 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/__init__.py +4 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/config.py +396 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B0_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B1_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B2_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B3_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B4_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet/EN-B5_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/effnet.py +281 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnet.py +596 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-1.6GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-12GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-16GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-200MF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-3.2GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-32GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-4.0GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-400MF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-6.4GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-600MF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-8.0GF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnetx/RegNetX-800MF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-1.6GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-12GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-16GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-200MF_dds_8gpu.yaml +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-3.2GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-32GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-4.0GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-400MF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-6.4GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-600MF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-8.0GF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/regnet/regnety/RegNetY-800MF_dds_8gpu.yaml +27 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/repvgg.py +309 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/resnest.py +365 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/resnet.py +364 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/resnext.py +335 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/shufflenet.py +203 -0
- dnt/third_party/fast-reid/fastreid/modeling/backbones/vision_transformer.py +399 -0
- dnt/third_party/fast-reid/fastreid/modeling/heads/__init__.py +11 -0
- dnt/third_party/fast-reid/fastreid/modeling/heads/build.py +25 -0
- dnt/third_party/fast-reid/fastreid/modeling/heads/clas_head.py +36 -0
- dnt/third_party/fast-reid/fastreid/modeling/heads/embedding_head.py +151 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/__init__.py +12 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/circle_loss.py +71 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/cross_entroy_loss.py +54 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/focal_loss.py +92 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/triplet_loss.py +113 -0
- dnt/third_party/fast-reid/fastreid/modeling/losses/utils.py +48 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/__init__.py +14 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/baseline.py +188 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/build.py +26 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/distiller.py +140 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/mgn.py +394 -0
- dnt/third_party/fast-reid/fastreid/modeling/meta_arch/moco.py +126 -0
- dnt/third_party/fast-reid/fastreid/solver/__init__.py +8 -0
- dnt/third_party/fast-reid/fastreid/solver/build.py +348 -0
- dnt/third_party/fast-reid/fastreid/solver/lr_scheduler.py +66 -0
- dnt/third_party/fast-reid/fastreid/solver/optim/__init__.py +10 -0
- dnt/third_party/fast-reid/fastreid/solver/optim/lamb.py +123 -0
- dnt/third_party/fast-reid/fastreid/solver/optim/radam.py +149 -0
- dnt/third_party/fast-reid/fastreid/solver/optim/swa.py +246 -0
- dnt/third_party/fast-reid/fastreid/utils/__init__.py +6 -0
- dnt/third_party/fast-reid/fastreid/utils/checkpoint.py +503 -0
- dnt/third_party/fast-reid/fastreid/utils/collect_env.py +158 -0
- dnt/third_party/fast-reid/fastreid/utils/comm.py +255 -0
- dnt/third_party/fast-reid/fastreid/utils/compute_dist.py +200 -0
- dnt/third_party/fast-reid/fastreid/utils/env.py +119 -0
- dnt/third_party/fast-reid/fastreid/utils/events.py +461 -0
- dnt/third_party/fast-reid/fastreid/utils/faiss_utils.py +127 -0
- dnt/third_party/fast-reid/fastreid/utils/file_io.py +520 -0
- dnt/third_party/fast-reid/fastreid/utils/history_buffer.py +71 -0
- dnt/third_party/fast-reid/fastreid/utils/logger.py +211 -0
- dnt/third_party/fast-reid/fastreid/utils/params.py +103 -0
- dnt/third_party/fast-reid/fastreid/utils/precision_bn.py +94 -0
- dnt/third_party/fast-reid/fastreid/utils/registry.py +66 -0
- dnt/third_party/fast-reid/fastreid/utils/summary.py +120 -0
- dnt/third_party/fast-reid/fastreid/utils/timer.py +68 -0
- dnt/third_party/fast-reid/fastreid/utils/visualizer.py +278 -0
- dnt/track/__init__.py +2 -0
- dnt/track/botsort/__init__.py +4 -0
- dnt/track/botsort/bot_tracker/__init__.py +3 -0
- dnt/track/botsort/bot_tracker/basetrack.py +60 -0
- dnt/track/botsort/bot_tracker/bot_sort.py +473 -0
- dnt/track/botsort/bot_tracker/gmc.py +316 -0
- dnt/track/botsort/bot_tracker/kalman_filter.py +269 -0
- dnt/track/botsort/bot_tracker/matching.py +194 -0
- dnt/track/botsort/bot_tracker/mc_bot_sort.py +505 -0
- dnt/track/{dsort/utils → botsort/bot_tracker/tracking_utils}/evaluation.py +14 -4
- dnt/track/{dsort/utils → botsort/bot_tracker/tracking_utils}/io.py +19 -36
- dnt/track/botsort/bot_tracker/tracking_utils/timer.py +37 -0
- dnt/track/botsort/inference.py +96 -0
- dnt/track/config.py +120 -0
- dnt/track/dsort/configs/bagtricks_R50.yml +7 -0
- dnt/track/dsort/configs/deep_sort.yaml +0 -0
- dnt/track/dsort/configs/fastreid.yaml +1 -1
- dnt/track/dsort/deep_sort/deep/checkpoint/ckpt.t7 +0 -0
- dnt/track/dsort/deep_sort/deep/feature_extractor.py +87 -8
- dnt/track/dsort/deep_sort/deep_sort.py +31 -20
- dnt/track/dsort/deep_sort/sort/detection.py +2 -1
- dnt/track/dsort/deep_sort/sort/iou_matching.py +0 -2
- dnt/track/dsort/deep_sort/sort/linear_assignment.py +0 -3
- dnt/track/dsort/deep_sort/sort/nn_matching.py +5 -5
- dnt/track/dsort/deep_sort/sort/preprocessing.py +1 -2
- dnt/track/dsort/deep_sort/sort/track.py +2 -1
- dnt/track/dsort/deep_sort/sort/tracker.py +1 -1
- dnt/track/dsort/dsort.py +43 -33
- dnt/track/re_class.py +117 -0
- dnt/track/sort/sort.py +9 -6
- dnt/track/tracker.py +213 -32
- {dnt-0.2.4.dist-info → dnt-0.3.1.7.dist-info}/METADATA +41 -13
- dnt-0.3.1.7.dist-info/RECORD +315 -0
- {dnt-0.2.4.dist-info → dnt-0.3.1.7.dist-info}/WHEEL +1 -1
- dnt/analysis/yield.py +0 -9
- dnt/track/dsort/deep_sort/deep/evaluate.py +0 -15
- dnt/track/dsort/deep_sort/deep/original_model.py +0 -106
- dnt/track/dsort/deep_sort/deep/test.py +0 -77
- dnt/track/dsort/deep_sort/deep/train.py +0 -189
- dnt/track/dsort/utils/asserts.py +0 -13
- dnt/track/dsort/utils/draw.py +0 -36
- dnt/track/dsort/utils/json_logger.py +0 -383
- dnt/track/dsort/utils/log.py +0 -17
- dnt/track/dsort/utils/parser.py +0 -35
- dnt/track/dsort/utils/tools.py +0 -39
- dnt-0.2.4.dist-info/RECORD +0 -64
- /dnt/{track/dsort/utils → third_party/fast-reid/checkpoint}/__init__.py +0 -0
- {dnt-0.2.4.dist-info → dnt-0.3.1.7.dist-info/licenses}/LICENSE +0 -0
- {dnt-0.2.4.dist-info → dnt-0.3.1.7.dist-info}/top_level.txt +0 -0
dnt/shared/synhcro.py
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
from datetime import datetime
|
|
3
|
+
from pytz import timezone
|
|
4
|
+
from dnt.detect import Detector
|
|
5
|
+
from tqdm import tqdm
|
|
6
|
+
import os
|
|
7
|
+
|
|
8
|
+
class Synchronizer():
|
|
9
|
+
def __init__(self, videos:list[str], ref_frame:int, ref_time:int, ref_timezone:str='US/Eastern', offsets:list[int]=None) -> None:
|
|
10
|
+
self.videos = videos
|
|
11
|
+
self.ref_frame = ref_frame
|
|
12
|
+
self.ref_time = ref_time
|
|
13
|
+
self.ref_timezone = timezone(ref_timezone)
|
|
14
|
+
self.offsets = offsets
|
|
15
|
+
|
|
16
|
+
def process(self, output_path:str=None, local:bool=False, message:bool=False)->pd.DataFrame:
|
|
17
|
+
'''
|
|
18
|
+
Add unix time stamp to each frame
|
|
19
|
+
Inputs:
|
|
20
|
+
output_path - Output folder for output files, if None, will not produce files
|
|
21
|
+
local - if generate local time string
|
|
22
|
+
Returns:
|
|
23
|
+
a Dataframe contains frame and timestamps ['frame', 'unix_time', 'video', 'local_time'(if local is True)]
|
|
24
|
+
'''
|
|
25
|
+
ref_frame = self.ref_frame
|
|
26
|
+
ref_time = self.ref_time
|
|
27
|
+
offsets = [0] * len(videos)
|
|
28
|
+
if self.offsets:
|
|
29
|
+
offsets = self.offsets
|
|
30
|
+
|
|
31
|
+
results = []
|
|
32
|
+
cnt = 0
|
|
33
|
+
for video in self.videos:
|
|
34
|
+
|
|
35
|
+
if fps <= 0:
|
|
36
|
+
raise Exception("fps is invalid.")
|
|
37
|
+
self.milliseconds_per_frame = 1/self.fps * 1000
|
|
38
|
+
|
|
39
|
+
df = Synchronizer.add_unix_time(video, ref_frame, ref_time, video_index=cnt+1, video_tot=len(self.videos), message=message)
|
|
40
|
+
|
|
41
|
+
if local:
|
|
42
|
+
df['local_time'] = df['unix_time'].apply(lambda x: Synchronizer.convert_unix_local(x))
|
|
43
|
+
results.append(df)
|
|
44
|
+
|
|
45
|
+
if output_path:
|
|
46
|
+
basename = os.path.basename(video).split('.')[0]
|
|
47
|
+
time_file = os.path.join(output_path, basename+'_time.csv')
|
|
48
|
+
df.to_csv(time_file, index=False)
|
|
49
|
+
|
|
50
|
+
cnt+=1
|
|
51
|
+
if cnt<len(videos):
|
|
52
|
+
fps = Detector.get_fps(video)
|
|
53
|
+
if fps <= 0:
|
|
54
|
+
raise Exception('fps is invalid for {}'.format(video))
|
|
55
|
+
milliseconds_per_frame = 1/fps * 1000
|
|
56
|
+
ref_frame = 0
|
|
57
|
+
ref_time = df['unix_time'].max() + offsets[cnt] * milliseconds_per_frame
|
|
58
|
+
|
|
59
|
+
return pd.concat(results)
|
|
60
|
+
|
|
61
|
+
@staticmethod
|
|
62
|
+
def add_unix_time_to_frame(frame:int, ref_frame:int, ref_time:int, ref_timezone:str='US/Eastern',
|
|
63
|
+
fps:int=30, verbos=True, local=False) -> int:
|
|
64
|
+
if fps <= 0:
|
|
65
|
+
raise Exception("fps is invalid.")
|
|
66
|
+
milliseconds_per_frame = 1/fps * 1000
|
|
67
|
+
|
|
68
|
+
dif_frame = frame - ref_frame
|
|
69
|
+
return round(ref_time + float(dif_frame) * milliseconds_per_frame)
|
|
70
|
+
|
|
71
|
+
@staticmethod
|
|
72
|
+
def add_unix_time_to_frames(frames:pd.DataFrame, ref_frame:int, ref_time:int, ref_timezone:str='US/Eastern',
|
|
73
|
+
fps:int=30, verbos=True, local=False) -> None:
|
|
74
|
+
|
|
75
|
+
if fps <= 0:
|
|
76
|
+
raise Exception("fps is invalid.")
|
|
77
|
+
milliseconds_per_frame = 1/fps * 1000
|
|
78
|
+
|
|
79
|
+
pbar = tqdm(total=frames, desc='Adding timestamp')
|
|
80
|
+
for index, frame in frames.iterrows():
|
|
81
|
+
dif_frame = frame['frame'] - ref_frame
|
|
82
|
+
frame_time = round(ref_time + dif_frame * milliseconds_per_frame)
|
|
83
|
+
frames.at[index, 'unix_time'] = frame_time
|
|
84
|
+
if local:
|
|
85
|
+
frames.at[index, 'local_time'] = Synchronizer.convert_unix_local(frame_time)
|
|
86
|
+
|
|
87
|
+
if verbos:
|
|
88
|
+
pbar.update()
|
|
89
|
+
|
|
90
|
+
return frames
|
|
91
|
+
|
|
92
|
+
@staticmethod
|
|
93
|
+
def add_unix_time(video, ref_frame, ref_time, video_index:int=None, video_tot=None, message:bool=False)->pd.DataFrame:
|
|
94
|
+
'''
|
|
95
|
+
Add unit timestamp to each frame
|
|
96
|
+
Inputs:
|
|
97
|
+
video - video file name
|
|
98
|
+
ref_frame - the reference frame
|
|
99
|
+
ref_time - the unix time for the reference frame
|
|
100
|
+
video_index - the index of video
|
|
101
|
+
video_tot - the total number of videos
|
|
102
|
+
'''
|
|
103
|
+
fps = Detector.get_fps(video)
|
|
104
|
+
if fps <= 0:
|
|
105
|
+
raise Exception("fps is invalid for {}".format(video))
|
|
106
|
+
milliseconds_per_frame = 1/fps * 1000
|
|
107
|
+
frames = Detector.get_frames(video)
|
|
108
|
+
|
|
109
|
+
if message:
|
|
110
|
+
if video_index and video_tot:
|
|
111
|
+
pbar = tqdm(total=frames, desc='Adding unix time: {} of {}'.format(video_index, video_tot))
|
|
112
|
+
else:
|
|
113
|
+
pbar = tqdm(total=frames, desc='Adding unix time: {}'.format(video))
|
|
114
|
+
|
|
115
|
+
results = []
|
|
116
|
+
for frame in range(frames):
|
|
117
|
+
dif_frame = frame - ref_frame
|
|
118
|
+
frame_time = round(ref_time + dif_frame * milliseconds_per_frame)
|
|
119
|
+
results.append([frame, frame_time, video])
|
|
120
|
+
|
|
121
|
+
if message:
|
|
122
|
+
pbar.update()
|
|
123
|
+
|
|
124
|
+
df = pd.DataFrame(results, columns=['frame', 'unix_time', 'video'])
|
|
125
|
+
return df
|
|
126
|
+
|
|
127
|
+
@staticmethod
|
|
128
|
+
def convert_unix_local(unix_time:int, ref_timezone:str='US/Eastern')->str:
|
|
129
|
+
tz = timezone(ref_timezone)
|
|
130
|
+
return str(datetime.fromtimestamp(unix_time/1000, tz).__str__())
|
|
131
|
+
|
|
132
|
+
if __name__ == '__main__':
|
|
133
|
+
videos = ['/mnt/d/videos/ped2stage/1026_2/videos/gh011293.mp4',
|
|
134
|
+
'/mnt/d/videos/ped2stage/1026_2/videos/gh021293.mp4',
|
|
135
|
+
'/mnt/d/videos/ped2stage/1026_2/videos/gh031293.mp4',
|
|
136
|
+
'/mnt/d/videos/ped2stage/1026_2/videos/gh041293.mp4']
|
|
137
|
+
|
|
138
|
+
ref_frame = 2
|
|
139
|
+
ref_time = 1698331984441
|
|
140
|
+
|
|
141
|
+
synchronizer = Synchronizer(videos, ref_frame, ref_time)
|
|
142
|
+
df = synchronizer.process('/mnt/d/videos/ped2stage/time_synchro', local=True, message=True)
|
|
143
|
+
df.to_csv('/mnt/d/videos/ped2stage/time_synchro/text2.csv', index=False)
|
|
144
|
+
|
|
145
|
+
'''
|
|
146
|
+
results = Synchronizer.add_unix_time(input_video, ref_frame, ref_time)
|
|
147
|
+
results['local_time'] = results['unix_time'].apply(lambda x: Synchronizer.convert_unix_local(x))
|
|
148
|
+
|
|
149
|
+
results.to_csv('/mnt/d/videos/ped2stage/time_synchro/text.csv', index=False)
|
|
150
|
+
'''
|
dnt/shared/util.py
CHANGED
|
@@ -18,19 +18,32 @@ import cv2
|
|
|
18
18
|
|
|
19
19
|
visdrone_classes = {'car': 4, 'bus': 9, 'truck': 6, 'pedestrian': 1, 'van': 5}
|
|
20
20
|
|
|
21
|
-
def load_class_dict(name_file=None):
|
|
21
|
+
def load_class_dict(name_file:str=None)->dict:
|
|
22
22
|
if not name_file:
|
|
23
23
|
lib_root = pathlib.Path(__file__).resolve().parents[1]
|
|
24
24
|
data_path = os.path.join(lib_root, 'shared/data')
|
|
25
25
|
name_file = os.path.join(data_path, 'coco.names')
|
|
26
26
|
|
|
27
|
-
print(name_file)
|
|
28
|
-
input('...')
|
|
29
|
-
|
|
30
27
|
class_dict = pd.read_csv(name_file,header=None).to_dict()
|
|
31
28
|
class_dict_reverse = dict(map(reversed, class_dict.items()))
|
|
29
|
+
|
|
30
|
+
print(class_dict_reverse)
|
|
31
|
+
input('...')
|
|
32
32
|
return class_dict_reverse
|
|
33
33
|
|
|
34
|
+
def load_classes(name_file=None)->list:
|
|
35
|
+
if not name_file:
|
|
36
|
+
lib_root = pathlib.Path(__file__).resolve().parents[1]
|
|
37
|
+
data_path = os.path.join(lib_root, 'shared/data')
|
|
38
|
+
name_file = os.path.join(data_path, 'coco.names')
|
|
39
|
+
|
|
40
|
+
my_file = open(name_file, "r")
|
|
41
|
+
data = my_file.read()
|
|
42
|
+
results = data.split("\n")
|
|
43
|
+
my_file.close()
|
|
44
|
+
|
|
45
|
+
return results
|
|
46
|
+
|
|
34
47
|
def load_mot16(detections, nms_overlap_thresh=None, with_classes=True, nms_per_class=False, class_filename=""):
|
|
35
48
|
"""
|
|
36
49
|
Loads detections stored in a mot-challenge like formatted CSV or numpy array (fieldNames = ['frame', 'id', 'x', 'y',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from fast_reid_interfece import get_cfg, FastReIDInterface, preprocess, postprocess
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
_BASE_: Base-bagtricks.yml
|
|
2
|
+
|
|
3
|
+
MODEL:
|
|
4
|
+
BACKBONE:
|
|
5
|
+
WITH_NL: True
|
|
6
|
+
|
|
7
|
+
HEADS:
|
|
8
|
+
POOL_LAYER: GeneralizedMeanPooling
|
|
9
|
+
|
|
10
|
+
LOSSES:
|
|
11
|
+
NAME: ("CrossEntropyLoss", "TripletLoss")
|
|
12
|
+
CE:
|
|
13
|
+
EPSILON: 0.1
|
|
14
|
+
SCALE: 1.0
|
|
15
|
+
|
|
16
|
+
TRI:
|
|
17
|
+
MARGIN: 0.0
|
|
18
|
+
HARD_MINING: False
|
|
19
|
+
SCALE: 1.0
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
_BASE_: Base-bagtricks.yml
|
|
2
|
+
|
|
3
|
+
MODEL:
|
|
4
|
+
FREEZE_LAYERS: [ backbone ]
|
|
5
|
+
|
|
6
|
+
BACKBONE:
|
|
7
|
+
WITH_NL: True
|
|
8
|
+
|
|
9
|
+
HEADS:
|
|
10
|
+
NECK_FEAT: after
|
|
11
|
+
POOL_LAYER: GeneralizedMeanPoolingP
|
|
12
|
+
CLS_LAYER: CircleSoftmax
|
|
13
|
+
SCALE: 64
|
|
14
|
+
MARGIN: 0.35
|
|
15
|
+
|
|
16
|
+
LOSSES:
|
|
17
|
+
NAME: ("CrossEntropyLoss", "TripletLoss",)
|
|
18
|
+
CE:
|
|
19
|
+
EPSILON: 0.1
|
|
20
|
+
SCALE: 1.0
|
|
21
|
+
|
|
22
|
+
TRI:
|
|
23
|
+
MARGIN: 0.0
|
|
24
|
+
HARD_MINING: True
|
|
25
|
+
NORM_FEAT: False
|
|
26
|
+
SCALE: 1.0
|
|
27
|
+
|
|
28
|
+
INPUT:
|
|
29
|
+
SIZE_TRAIN: [ 384, 128 ]
|
|
30
|
+
SIZE_TEST: [ 384, 128 ]
|
|
31
|
+
|
|
32
|
+
AUTOAUG:
|
|
33
|
+
ENABLED: True
|
|
34
|
+
PROB: 0.1
|
|
35
|
+
|
|
36
|
+
DATALOADER:
|
|
37
|
+
NUM_INSTANCE: 16
|
|
38
|
+
|
|
39
|
+
SOLVER:
|
|
40
|
+
AMP:
|
|
41
|
+
ENABLED: True
|
|
42
|
+
OPT: Adam
|
|
43
|
+
MAX_EPOCH: 60
|
|
44
|
+
BASE_LR: 0.00035
|
|
45
|
+
WEIGHT_DECAY: 0.0005
|
|
46
|
+
IMS_PER_BATCH: 64
|
|
47
|
+
|
|
48
|
+
SCHED: CosineAnnealingLR
|
|
49
|
+
DELAY_EPOCHS: 30
|
|
50
|
+
ETA_MIN_LR: 0.0000007
|
|
51
|
+
|
|
52
|
+
WARMUP_FACTOR: 0.1
|
|
53
|
+
WARMUP_ITERS: 2000
|
|
54
|
+
|
|
55
|
+
FREEZE_ITERS: 1000
|
|
56
|
+
|
|
57
|
+
CHECKPOINT_PERIOD: 20
|
|
58
|
+
|
|
59
|
+
TEST:
|
|
60
|
+
EVAL_PERIOD: 10
|
|
61
|
+
IMS_PER_BATCH: 128
|
|
62
|
+
|
|
63
|
+
CUDNN_BENCHMARK: True
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
META_ARCHITECTURE: Baseline
|
|
3
|
+
|
|
4
|
+
BACKBONE:
|
|
5
|
+
NAME: build_resnet_backbone
|
|
6
|
+
NORM: BN
|
|
7
|
+
DEPTH: 50x
|
|
8
|
+
LAST_STRIDE: 1
|
|
9
|
+
FEAT_DIM: 2048
|
|
10
|
+
WITH_IBN: False
|
|
11
|
+
PRETRAIN: True
|
|
12
|
+
|
|
13
|
+
HEADS:
|
|
14
|
+
NAME: EmbeddingHead
|
|
15
|
+
NORM: BN
|
|
16
|
+
WITH_BNNECK: True
|
|
17
|
+
POOL_LAYER: GlobalAvgPool
|
|
18
|
+
NECK_FEAT: before
|
|
19
|
+
CLS_LAYER: Linear
|
|
20
|
+
|
|
21
|
+
LOSSES:
|
|
22
|
+
NAME: ("CrossEntropyLoss", "TripletLoss",)
|
|
23
|
+
|
|
24
|
+
CE:
|
|
25
|
+
EPSILON: 0.1
|
|
26
|
+
SCALE: 1.
|
|
27
|
+
|
|
28
|
+
TRI:
|
|
29
|
+
MARGIN: 0.3
|
|
30
|
+
HARD_MINING: True
|
|
31
|
+
NORM_FEAT: False
|
|
32
|
+
SCALE: 1.
|
|
33
|
+
|
|
34
|
+
INPUT:
|
|
35
|
+
SIZE_TRAIN: [ 256, 128 ]
|
|
36
|
+
SIZE_TEST: [ 256, 128 ]
|
|
37
|
+
|
|
38
|
+
REA:
|
|
39
|
+
ENABLED: True
|
|
40
|
+
PROB: 0.5
|
|
41
|
+
|
|
42
|
+
FLIP:
|
|
43
|
+
ENABLED: True
|
|
44
|
+
|
|
45
|
+
PADDING:
|
|
46
|
+
ENABLED: True
|
|
47
|
+
|
|
48
|
+
DATALOADER:
|
|
49
|
+
SAMPLER_TRAIN: NaiveIdentitySampler
|
|
50
|
+
NUM_INSTANCE: 4
|
|
51
|
+
NUM_WORKERS: 8
|
|
52
|
+
|
|
53
|
+
SOLVER:
|
|
54
|
+
AMP:
|
|
55
|
+
ENABLED: True
|
|
56
|
+
OPT: Adam
|
|
57
|
+
MAX_EPOCH: 120
|
|
58
|
+
BASE_LR: 0.00035
|
|
59
|
+
WEIGHT_DECAY: 0.0005
|
|
60
|
+
WEIGHT_DECAY_NORM: 0.0005
|
|
61
|
+
IMS_PER_BATCH: 64
|
|
62
|
+
|
|
63
|
+
SCHED: MultiStepLR
|
|
64
|
+
STEPS: [ 40, 90 ]
|
|
65
|
+
GAMMA: 0.1
|
|
66
|
+
|
|
67
|
+
WARMUP_FACTOR: 0.1
|
|
68
|
+
WARMUP_ITERS: 2000
|
|
69
|
+
|
|
70
|
+
CHECKPOINT_PERIOD: 30
|
|
71
|
+
|
|
72
|
+
TEST:
|
|
73
|
+
EVAL_PERIOD: 30
|
|
74
|
+
IMS_PER_BATCH: 128
|
|
75
|
+
|
|
76
|
+
CUDNN_BENCHMARK: True
|