dnt 0.2.4__py3-none-any.whl → 0.3.1.8__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.
- 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 +631 -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.3.1.8.dist-info/METADATA +117 -0
- dnt-0.3.1.8.dist-info/RECORD +315 -0
- {dnt-0.2.4.dist-info → dnt-0.3.1.8.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/METADATA +0 -35
- 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.8.dist-info/licenses}/LICENSE +0 -0
- {dnt-0.2.4.dist-info → dnt-0.3.1.8.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: l1aoxingyu
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import os
|
|
9
|
+
import os.path as osp
|
|
10
|
+
|
|
11
|
+
from .bases import ImageDataset
|
|
12
|
+
from ..datasets import DATASET_REGISTRY
|
|
13
|
+
##### Log #####
|
|
14
|
+
# 22.01.2019
|
|
15
|
+
# - add v2
|
|
16
|
+
# - v1 and v2 differ in dir names
|
|
17
|
+
# - note that faces in v2 are blurred
|
|
18
|
+
TRAIN_DIR_KEY = 'train_dir'
|
|
19
|
+
TEST_DIR_KEY = 'test_dir'
|
|
20
|
+
VERSION_DICT = {
|
|
21
|
+
'MSMT17_V1': {
|
|
22
|
+
TRAIN_DIR_KEY: 'train',
|
|
23
|
+
TEST_DIR_KEY: 'test',
|
|
24
|
+
},
|
|
25
|
+
'MSMT17_V2': {
|
|
26
|
+
TRAIN_DIR_KEY: 'mask_train_v2',
|
|
27
|
+
TEST_DIR_KEY: 'mask_test_v2',
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@DATASET_REGISTRY.register()
|
|
33
|
+
class MSMT17(ImageDataset):
|
|
34
|
+
"""MSMT17.
|
|
35
|
+
Reference:
|
|
36
|
+
Wei et al. Person Transfer GAN to Bridge Domain Gap for Person Re-Identification. CVPR 2018.
|
|
37
|
+
URL: `<http://www.pkuvmc.com/publications/msmt17.html>`_
|
|
38
|
+
|
|
39
|
+
Dataset statistics:
|
|
40
|
+
- identities: 4101.
|
|
41
|
+
- images: 32621 (train) + 11659 (query) + 82161 (gallery).
|
|
42
|
+
- cameras: 15.
|
|
43
|
+
"""
|
|
44
|
+
# dataset_dir = 'MSMT17_V2'
|
|
45
|
+
dataset_url = None
|
|
46
|
+
dataset_name = 'msmt17'
|
|
47
|
+
|
|
48
|
+
def __init__(self, root='datasets', **kwargs):
|
|
49
|
+
self.dataset_dir = root
|
|
50
|
+
|
|
51
|
+
has_main_dir = False
|
|
52
|
+
for main_dir in VERSION_DICT:
|
|
53
|
+
if osp.exists(osp.join(self.dataset_dir, main_dir)):
|
|
54
|
+
train_dir = VERSION_DICT[main_dir][TRAIN_DIR_KEY]
|
|
55
|
+
test_dir = VERSION_DICT[main_dir][TEST_DIR_KEY]
|
|
56
|
+
has_main_dir = True
|
|
57
|
+
break
|
|
58
|
+
assert has_main_dir, 'Dataset folder not found'
|
|
59
|
+
|
|
60
|
+
self.train_dir = osp.join(self.dataset_dir, main_dir, train_dir)
|
|
61
|
+
self.test_dir = osp.join(self.dataset_dir, main_dir, test_dir)
|
|
62
|
+
self.list_train_path = osp.join(self.dataset_dir, main_dir, 'list_train.txt')
|
|
63
|
+
self.list_val_path = osp.join(self.dataset_dir, main_dir, 'list_val.txt')
|
|
64
|
+
self.list_query_path = osp.join(self.dataset_dir, main_dir, 'list_query.txt')
|
|
65
|
+
self.list_gallery_path = osp.join(self.dataset_dir, main_dir, 'list_gallery.txt')
|
|
66
|
+
|
|
67
|
+
required_files = [
|
|
68
|
+
self.dataset_dir,
|
|
69
|
+
self.train_dir,
|
|
70
|
+
self.test_dir
|
|
71
|
+
]
|
|
72
|
+
self.check_before_run(required_files)
|
|
73
|
+
|
|
74
|
+
train = self.process_dir(self.train_dir, self.list_train_path)
|
|
75
|
+
val = self.process_dir(self.train_dir, self.list_val_path)
|
|
76
|
+
query = self.process_dir(self.test_dir, self.list_query_path, is_train=False)
|
|
77
|
+
gallery = self.process_dir(self.test_dir, self.list_gallery_path, is_train=False)
|
|
78
|
+
|
|
79
|
+
num_train_pids = self.get_num_pids(train)
|
|
80
|
+
query_tmp = []
|
|
81
|
+
for img_path, pid, camid in query:
|
|
82
|
+
query_tmp.append((img_path, pid+num_train_pids, camid))
|
|
83
|
+
del query
|
|
84
|
+
query = query_tmp
|
|
85
|
+
|
|
86
|
+
gallery_temp = []
|
|
87
|
+
for img_path, pid, camid in gallery:
|
|
88
|
+
gallery_temp.append((img_path, pid+num_train_pids, camid))
|
|
89
|
+
del gallery
|
|
90
|
+
gallery = gallery_temp
|
|
91
|
+
|
|
92
|
+
# Note: to fairly compare with published methods on the conventional ReID setting,
|
|
93
|
+
# do not add val images to the training set.
|
|
94
|
+
if 'combineall' in kwargs and kwargs['combineall']:
|
|
95
|
+
train += val
|
|
96
|
+
super(MSMT17, self).__init__(train, query, gallery, **kwargs)
|
|
97
|
+
|
|
98
|
+
def process_dir(self, dir_path, list_path, is_train=True):
|
|
99
|
+
with open(list_path, 'r') as txt:
|
|
100
|
+
lines = txt.readlines()
|
|
101
|
+
|
|
102
|
+
data = []
|
|
103
|
+
|
|
104
|
+
for img_idx, img_info in enumerate(lines):
|
|
105
|
+
img_path, pid = img_info.split(' ')
|
|
106
|
+
pid = int(pid) # no need to relabel
|
|
107
|
+
camid = int(img_path.split('_')[2]) - 1 # index starts from 0
|
|
108
|
+
img_path = osp.join(dir_path, img_path)
|
|
109
|
+
if is_train:
|
|
110
|
+
pid = self.dataset_name + "_" + str(pid)
|
|
111
|
+
camid = self.dataset_name + "_" + str(camid)
|
|
112
|
+
data.append((img_path, pid, camid))
|
|
113
|
+
|
|
114
|
+
return data
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['PeS3D',]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class PeS3D(ImageDataset):
|
|
18
|
+
"""3Dpes
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "3DPeS"
|
|
21
|
+
dataset_name = "pes3d"
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
|
|
37
|
+
pid_list = os.listdir(train_path)
|
|
38
|
+
for pid_dir in pid_list:
|
|
39
|
+
pid = self.dataset_name + "_" + pid_dir
|
|
40
|
+
img_list = glob(os.path.join(train_path, pid_dir, "*.bmp"))
|
|
41
|
+
for img_path in img_list:
|
|
42
|
+
camid = self.dataset_name + "_cam0"
|
|
43
|
+
data.append([img_path, pid, camid])
|
|
44
|
+
return data
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['PKU', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class PKU(ImageDataset):
|
|
18
|
+
"""PKU
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "PKUv1a_128x48"
|
|
21
|
+
dataset_name = 'pku'
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
img_paths = glob(os.path.join(train_path, "*.png"))
|
|
37
|
+
|
|
38
|
+
for img_path in img_paths:
|
|
39
|
+
split_path = img_path.split('/')
|
|
40
|
+
img_info = split_path[-1].split('_')
|
|
41
|
+
pid = self.dataset_name + "_" + img_info[0]
|
|
42
|
+
camid = self.dataset_name + "_" + img_info[1]
|
|
43
|
+
data.append([img_path, pid, camid])
|
|
44
|
+
return data
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['PRAI', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class PRAI(ImageDataset):
|
|
18
|
+
"""PRAI
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "PRAI-1581"
|
|
21
|
+
dataset_name = 'prai'
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir, 'images')
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
img_paths = glob(os.path.join(train_path, "*.jpg"))
|
|
37
|
+
for img_path in img_paths:
|
|
38
|
+
split_path = img_path.split('/')
|
|
39
|
+
img_info = split_path[-1].split('_')
|
|
40
|
+
pid = self.dataset_name + "_" + img_info[0]
|
|
41
|
+
camid = self.dataset_name + "_" + img_info[1]
|
|
42
|
+
data.append([img_path, pid, camid])
|
|
43
|
+
return data
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
10
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
11
|
+
|
|
12
|
+
__all__ = ['PRID', ]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@DATASET_REGISTRY.register()
|
|
16
|
+
class PRID(ImageDataset):
|
|
17
|
+
"""PRID
|
|
18
|
+
"""
|
|
19
|
+
dataset_dir = "prid_2011"
|
|
20
|
+
dataset_name = 'prid'
|
|
21
|
+
|
|
22
|
+
def __init__(self, root='datasets', **kwargs):
|
|
23
|
+
self.root = root
|
|
24
|
+
self.train_path = os.path.join(self.root, self.dataset_dir, 'slim_train')
|
|
25
|
+
|
|
26
|
+
required_files = [self.train_path]
|
|
27
|
+
self.check_before_run(required_files)
|
|
28
|
+
|
|
29
|
+
train = self.process_train(self.train_path)
|
|
30
|
+
|
|
31
|
+
super().__init__(train, [], [], **kwargs)
|
|
32
|
+
|
|
33
|
+
def process_train(self, train_path):
|
|
34
|
+
data = []
|
|
35
|
+
for root, dirs, files in os.walk(train_path):
|
|
36
|
+
for img_name in filter(lambda x: x.endswith('.png'), files):
|
|
37
|
+
img_path = os.path.join(root, img_name)
|
|
38
|
+
pid = self.dataset_name + '_' + root.split('/')[-1].split('_')[1]
|
|
39
|
+
camid = self.dataset_name + '_' + img_name.split('_')[0]
|
|
40
|
+
data.append([img_path, pid, camid])
|
|
41
|
+
return data
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['SAIVT', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class SAIVT(ImageDataset):
|
|
18
|
+
"""SAIVT
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "SAIVT-SoftBio"
|
|
21
|
+
dataset_name = "saivt"
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
|
|
37
|
+
pid_path = os.path.join(train_path, "cropped_images")
|
|
38
|
+
pid_list = os.listdir(pid_path)
|
|
39
|
+
|
|
40
|
+
for pid_name in pid_list:
|
|
41
|
+
pid = self.dataset_name + '_' + pid_name
|
|
42
|
+
img_list = glob(os.path.join(pid_path, pid_name, "*.jpeg"))
|
|
43
|
+
for img_path in img_list:
|
|
44
|
+
img_name = os.path.basename(img_path)
|
|
45
|
+
camid = self.dataset_name + '_' + img_name.split('-')[2]
|
|
46
|
+
data.append([img_path, pid, camid])
|
|
47
|
+
return data
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['SenseReID', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class SenseReID(ImageDataset):
|
|
18
|
+
"""Sense reid
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "SenseReID"
|
|
21
|
+
dataset_name = "senseid"
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
file_path_list = ['test_gallery', 'test_prob']
|
|
37
|
+
|
|
38
|
+
for file_path in file_path_list:
|
|
39
|
+
sub_file = os.path.join(train_path, file_path)
|
|
40
|
+
img_name = glob(os.path.join(sub_file, "*.jpg"))
|
|
41
|
+
for img_path in img_name:
|
|
42
|
+
img_name = img_path.split('/')[-1]
|
|
43
|
+
img_info = img_name.split('_')
|
|
44
|
+
pid = self.dataset_name + "_" + img_info[0]
|
|
45
|
+
camid = self.dataset_name + "_" + img_info[1].split('.')[0]
|
|
46
|
+
data.append([img_path, pid, camid])
|
|
47
|
+
return data
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
|
|
9
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
10
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
11
|
+
|
|
12
|
+
__all__ = ['Shinpuhkan', ]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@DATASET_REGISTRY.register()
|
|
16
|
+
class Shinpuhkan(ImageDataset):
|
|
17
|
+
"""shinpuhkan
|
|
18
|
+
"""
|
|
19
|
+
dataset_dir = "shinpuhkan"
|
|
20
|
+
dataset_name = 'shinpuhkan'
|
|
21
|
+
|
|
22
|
+
def __init__(self, root='datasets', **kwargs):
|
|
23
|
+
self.root = root
|
|
24
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
25
|
+
|
|
26
|
+
required_files = [self.train_path]
|
|
27
|
+
self.check_before_run(required_files)
|
|
28
|
+
|
|
29
|
+
train = self.process_train(self.train_path)
|
|
30
|
+
|
|
31
|
+
super().__init__(train, [], [], **kwargs)
|
|
32
|
+
|
|
33
|
+
def process_train(self, train_path):
|
|
34
|
+
data = []
|
|
35
|
+
|
|
36
|
+
for root, dirs, files in os.walk(train_path):
|
|
37
|
+
img_names = list(filter(lambda x: x.endswith(".jpg"), files))
|
|
38
|
+
# fmt: off
|
|
39
|
+
if len(img_names) == 0: continue
|
|
40
|
+
# fmt: on
|
|
41
|
+
for img_name in img_names:
|
|
42
|
+
img_path = os.path.join(root, img_name)
|
|
43
|
+
split_path = img_name.split('_')
|
|
44
|
+
pid = self.dataset_name + "_" + split_path[0]
|
|
45
|
+
camid = self.dataset_name + "_" + split_path[2]
|
|
46
|
+
data.append((img_path, pid, camid))
|
|
47
|
+
|
|
48
|
+
return data
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['SYSU_mm', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class SYSU_mm(ImageDataset):
|
|
18
|
+
"""sysu mm
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "SYSU-MM01"
|
|
21
|
+
dataset_name = "sysumm01"
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
|
|
37
|
+
file_path_list = ['cam1', 'cam2', 'cam4', 'cam5']
|
|
38
|
+
|
|
39
|
+
for file_path in file_path_list:
|
|
40
|
+
camid = self.dataset_name + "_" + file_path
|
|
41
|
+
pid_list = os.listdir(os.path.join(train_path, file_path))
|
|
42
|
+
for pid_dir in pid_list:
|
|
43
|
+
pid = self.dataset_name + "_" + pid_dir
|
|
44
|
+
img_list = glob(os.path.join(train_path, file_path, pid_dir, "*.jpg"))
|
|
45
|
+
for img_path in img_list:
|
|
46
|
+
data.append([img_path, pid, camid])
|
|
47
|
+
return data
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: xingyu liao
|
|
4
|
+
@contact: sherlockliao01@gmail.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
from glob import glob
|
|
9
|
+
|
|
10
|
+
from fastreid.data.datasets import DATASET_REGISTRY
|
|
11
|
+
from fastreid.data.datasets.bases import ImageDataset
|
|
12
|
+
|
|
13
|
+
__all__ = ['Thermalworld', ]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@DATASET_REGISTRY.register()
|
|
17
|
+
class Thermalworld(ImageDataset):
|
|
18
|
+
"""thermal world
|
|
19
|
+
"""
|
|
20
|
+
dataset_dir = "thermalworld_rgb"
|
|
21
|
+
dataset_name = "thermalworld"
|
|
22
|
+
|
|
23
|
+
def __init__(self, root='datasets', **kwargs):
|
|
24
|
+
self.root = root
|
|
25
|
+
self.train_path = os.path.join(self.root, self.dataset_dir)
|
|
26
|
+
|
|
27
|
+
required_files = [self.train_path]
|
|
28
|
+
self.check_before_run(required_files)
|
|
29
|
+
|
|
30
|
+
train = self.process_train(self.train_path)
|
|
31
|
+
|
|
32
|
+
super().__init__(train, [], [], **kwargs)
|
|
33
|
+
|
|
34
|
+
def process_train(self, train_path):
|
|
35
|
+
data = []
|
|
36
|
+
pid_list = os.listdir(train_path)
|
|
37
|
+
for pid_dir in pid_list:
|
|
38
|
+
pid = self.dataset_name + "_" + pid_dir
|
|
39
|
+
img_list = glob(os.path.join(train_path, pid_dir, "*.jpg"))
|
|
40
|
+
for img_path in img_list:
|
|
41
|
+
camid = self.dataset_name + "_cam0"
|
|
42
|
+
data.append([img_path, pid, camid])
|
|
43
|
+
return data
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# encoding: utf-8
|
|
2
|
+
"""
|
|
3
|
+
@author: Jinkai Zheng
|
|
4
|
+
@contact: 1315673509@qq.com
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os.path as osp
|
|
8
|
+
import random
|
|
9
|
+
|
|
10
|
+
from .bases import ImageDataset
|
|
11
|
+
from ..datasets import DATASET_REGISTRY
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@DATASET_REGISTRY.register()
|
|
15
|
+
class VehicleID(ImageDataset):
|
|
16
|
+
"""VehicleID.
|
|
17
|
+
|
|
18
|
+
Reference:
|
|
19
|
+
Liu et al. Deep relative distance learning: Tell the difference between similar vehicles. CVPR 2016.
|
|
20
|
+
|
|
21
|
+
URL: `<https://pkuml.org/resources/pku-vehicleid.html>`_
|
|
22
|
+
|
|
23
|
+
Train dataset statistics:
|
|
24
|
+
- identities: 13164.
|
|
25
|
+
- images: 113346.
|
|
26
|
+
"""
|
|
27
|
+
dataset_dir = "vehicleid"
|
|
28
|
+
dataset_name = "vehicleid"
|
|
29
|
+
|
|
30
|
+
def __init__(self, root='datasets', test_list='', **kwargs):
|
|
31
|
+
self.dataset_dir = osp.join(root, self.dataset_dir)
|
|
32
|
+
|
|
33
|
+
self.image_dir = osp.join(self.dataset_dir, 'image')
|
|
34
|
+
self.train_list = osp.join(self.dataset_dir, 'train_test_split/train_list.txt')
|
|
35
|
+
if test_list:
|
|
36
|
+
self.test_list = test_list
|
|
37
|
+
else:
|
|
38
|
+
self.test_list = osp.join(self.dataset_dir, 'train_test_split/test_list_13164.txt')
|
|
39
|
+
|
|
40
|
+
required_files = [
|
|
41
|
+
self.dataset_dir,
|
|
42
|
+
self.image_dir,
|
|
43
|
+
self.train_list,
|
|
44
|
+
self.test_list,
|
|
45
|
+
]
|
|
46
|
+
self.check_before_run(required_files)
|
|
47
|
+
|
|
48
|
+
train = self.process_dir(self.train_list, is_train=True)
|
|
49
|
+
query, gallery = self.process_dir(self.test_list, is_train=False)
|
|
50
|
+
|
|
51
|
+
super(VehicleID, self).__init__(train, query, gallery, **kwargs)
|
|
52
|
+
|
|
53
|
+
def process_dir(self, list_file, is_train=True):
|
|
54
|
+
img_list_lines = open(list_file, 'r').readlines()
|
|
55
|
+
|
|
56
|
+
dataset = []
|
|
57
|
+
for idx, line in enumerate(img_list_lines):
|
|
58
|
+
line = line.strip()
|
|
59
|
+
vid = int(line.split(' ')[1])
|
|
60
|
+
imgid = line.split(' ')[0]
|
|
61
|
+
img_path = osp.join(self.image_dir, f"{imgid}.jpg")
|
|
62
|
+
imgid = int(imgid)
|
|
63
|
+
if is_train:
|
|
64
|
+
vid = f"{self.dataset_name}_{vid}"
|
|
65
|
+
imgid = f"{self.dataset_name}_{imgid}"
|
|
66
|
+
dataset.append((img_path, vid, imgid))
|
|
67
|
+
|
|
68
|
+
if is_train: return dataset
|
|
69
|
+
else:
|
|
70
|
+
random.shuffle(dataset)
|
|
71
|
+
vid_container = set()
|
|
72
|
+
query = []
|
|
73
|
+
gallery = []
|
|
74
|
+
for sample in dataset:
|
|
75
|
+
if sample[1] not in vid_container:
|
|
76
|
+
vid_container.add(sample[1])
|
|
77
|
+
gallery.append(sample)
|
|
78
|
+
else:
|
|
79
|
+
query.append(sample)
|
|
80
|
+
|
|
81
|
+
return query, gallery
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
@DATASET_REGISTRY.register()
|
|
85
|
+
class SmallVehicleID(VehicleID):
|
|
86
|
+
"""VehicleID.
|
|
87
|
+
Small test dataset statistics:
|
|
88
|
+
- identities: 800.
|
|
89
|
+
- images: 6493.
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
def __init__(self, root='datasets', **kwargs):
|
|
93
|
+
dataset_dir = osp.join(root, self.dataset_dir)
|
|
94
|
+
self.test_list = osp.join(dataset_dir, 'train_test_split/test_list_800.txt')
|
|
95
|
+
|
|
96
|
+
super(SmallVehicleID, self).__init__(root, self.test_list, **kwargs)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@DATASET_REGISTRY.register()
|
|
100
|
+
class MediumVehicleID(VehicleID):
|
|
101
|
+
"""VehicleID.
|
|
102
|
+
Medium test dataset statistics:
|
|
103
|
+
- identities: 1600.
|
|
104
|
+
- images: 13377.
|
|
105
|
+
"""
|
|
106
|
+
|
|
107
|
+
def __init__(self, root='datasets', **kwargs):
|
|
108
|
+
dataset_dir = osp.join(root, self.dataset_dir)
|
|
109
|
+
self.test_list = osp.join(dataset_dir, 'train_test_split/test_list_1600.txt')
|
|
110
|
+
|
|
111
|
+
super(MediumVehicleID, self).__init__(root, self.test_list, **kwargs)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
@DATASET_REGISTRY.register()
|
|
115
|
+
class LargeVehicleID(VehicleID):
|
|
116
|
+
"""VehicleID.
|
|
117
|
+
Large test dataset statistics:
|
|
118
|
+
- identities: 2400.
|
|
119
|
+
- images: 19777.
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
def __init__(self, root='datasets', **kwargs):
|
|
123
|
+
dataset_dir = osp.join(root, self.dataset_dir)
|
|
124
|
+
self.test_list = osp.join(dataset_dir, 'train_test_split/test_list_2400.txt')
|
|
125
|
+
|
|
126
|
+
super(LargeVehicleID, self).__init__(root, self.test_list, **kwargs)
|