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
|
@@ -0,0 +1,396 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
4
|
+
#
|
|
5
|
+
# This source code is licensed under the MIT license found in the
|
|
6
|
+
# LICENSE file in the root directory of this source tree.
|
|
7
|
+
|
|
8
|
+
"""Configuration file (powered by YACS)."""
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import os
|
|
12
|
+
import sys
|
|
13
|
+
|
|
14
|
+
from yacs.config import CfgNode as CfgNode
|
|
15
|
+
|
|
16
|
+
# Global config object
|
|
17
|
+
_C = CfgNode()
|
|
18
|
+
|
|
19
|
+
# Example usage:
|
|
20
|
+
# from core.config import cfg
|
|
21
|
+
cfg = _C
|
|
22
|
+
|
|
23
|
+
# ------------------------------------------------------------------------------------ #
|
|
24
|
+
# Model options
|
|
25
|
+
# ------------------------------------------------------------------------------------ #
|
|
26
|
+
_C.MODEL = CfgNode()
|
|
27
|
+
|
|
28
|
+
# Model type
|
|
29
|
+
_C.MODEL.TYPE = ""
|
|
30
|
+
|
|
31
|
+
# Number of weight layers
|
|
32
|
+
_C.MODEL.DEPTH = 0
|
|
33
|
+
|
|
34
|
+
# Number of classes
|
|
35
|
+
_C.MODEL.NUM_CLASSES = 10
|
|
36
|
+
|
|
37
|
+
# Loss function (see pycls/models/loss.py for options)
|
|
38
|
+
_C.MODEL.LOSS_FUN = "cross_entropy"
|
|
39
|
+
|
|
40
|
+
# ------------------------------------------------------------------------------------ #
|
|
41
|
+
# ResNet options
|
|
42
|
+
# ------------------------------------------------------------------------------------ #
|
|
43
|
+
_C.RESNET = CfgNode()
|
|
44
|
+
|
|
45
|
+
# Transformation function (see pycls/models/resnet.py for options)
|
|
46
|
+
_C.RESNET.TRANS_FUN = "basic_transform"
|
|
47
|
+
|
|
48
|
+
# Number of groups to use (1 -> ResNet; > 1 -> ResNeXt)
|
|
49
|
+
_C.RESNET.NUM_GROUPS = 1
|
|
50
|
+
|
|
51
|
+
# Width of each group (64 -> ResNet; 4 -> ResNeXt)
|
|
52
|
+
_C.RESNET.WIDTH_PER_GROUP = 64
|
|
53
|
+
|
|
54
|
+
# Apply stride to 1x1 conv (True -> MSRA; False -> fb.torch)
|
|
55
|
+
_C.RESNET.STRIDE_1X1 = True
|
|
56
|
+
|
|
57
|
+
# ------------------------------------------------------------------------------------ #
|
|
58
|
+
# AnyNet options
|
|
59
|
+
# ------------------------------------------------------------------------------------ #
|
|
60
|
+
_C.ANYNET = CfgNode()
|
|
61
|
+
|
|
62
|
+
# Stem type
|
|
63
|
+
_C.ANYNET.STEM_TYPE = "simple_stem_in"
|
|
64
|
+
|
|
65
|
+
# Stem width
|
|
66
|
+
_C.ANYNET.STEM_W = 32
|
|
67
|
+
|
|
68
|
+
# Block type
|
|
69
|
+
_C.ANYNET.BLOCK_TYPE = "res_bottleneck_block"
|
|
70
|
+
|
|
71
|
+
# Depth for each stage (number of blocks in the stage)
|
|
72
|
+
_C.ANYNET.DEPTHS = []
|
|
73
|
+
|
|
74
|
+
# Width for each stage (width of each block in the stage)
|
|
75
|
+
_C.ANYNET.WIDTHS = []
|
|
76
|
+
|
|
77
|
+
# Strides for each stage (applies to the first block of each stage)
|
|
78
|
+
_C.ANYNET.STRIDES = []
|
|
79
|
+
|
|
80
|
+
# Bottleneck multipliers for each stage (applies to bottleneck block)
|
|
81
|
+
_C.ANYNET.BOT_MULS = []
|
|
82
|
+
|
|
83
|
+
# Group widths for each stage (applies to bottleneck block)
|
|
84
|
+
_C.ANYNET.GROUP_WS = []
|
|
85
|
+
|
|
86
|
+
# Whether SE is enabled for res_bottleneck_block
|
|
87
|
+
_C.ANYNET.SE_ON = False
|
|
88
|
+
|
|
89
|
+
# SE ratio
|
|
90
|
+
_C.ANYNET.SE_R = 0.25
|
|
91
|
+
|
|
92
|
+
# ------------------------------------------------------------------------------------ #
|
|
93
|
+
# RegNet options
|
|
94
|
+
# ------------------------------------------------------------------------------------ #
|
|
95
|
+
_C.REGNET = CfgNode()
|
|
96
|
+
|
|
97
|
+
# Stem type
|
|
98
|
+
_C.REGNET.STEM_TYPE = "simple_stem_in"
|
|
99
|
+
|
|
100
|
+
# Stem width
|
|
101
|
+
_C.REGNET.STEM_W = 32
|
|
102
|
+
|
|
103
|
+
# Block type
|
|
104
|
+
_C.REGNET.BLOCK_TYPE = "res_bottleneck_block"
|
|
105
|
+
|
|
106
|
+
# Stride of each stage
|
|
107
|
+
_C.REGNET.STRIDE = 2
|
|
108
|
+
|
|
109
|
+
# Squeeze-and-Excitation (RegNetY)
|
|
110
|
+
_C.REGNET.SE_ON = False
|
|
111
|
+
_C.REGNET.SE_R = 0.25
|
|
112
|
+
|
|
113
|
+
# Depth
|
|
114
|
+
_C.REGNET.DEPTH = 10
|
|
115
|
+
|
|
116
|
+
# Initial width
|
|
117
|
+
_C.REGNET.W0 = 32
|
|
118
|
+
|
|
119
|
+
# Slope
|
|
120
|
+
_C.REGNET.WA = 5.0
|
|
121
|
+
|
|
122
|
+
# Quantization
|
|
123
|
+
_C.REGNET.WM = 2.5
|
|
124
|
+
|
|
125
|
+
# Group width
|
|
126
|
+
_C.REGNET.GROUP_W = 16
|
|
127
|
+
|
|
128
|
+
# Bottleneck multiplier (bm = 1 / b from the paper)
|
|
129
|
+
_C.REGNET.BOT_MUL = 1.0
|
|
130
|
+
|
|
131
|
+
# ------------------------------------------------------------------------------------ #
|
|
132
|
+
# EfficientNet options
|
|
133
|
+
# ------------------------------------------------------------------------------------ #
|
|
134
|
+
_C.EN = CfgNode()
|
|
135
|
+
|
|
136
|
+
# Stem width
|
|
137
|
+
_C.EN.STEM_W = 32
|
|
138
|
+
|
|
139
|
+
# Depth for each stage (number of blocks in the stage)
|
|
140
|
+
_C.EN.DEPTHS = []
|
|
141
|
+
|
|
142
|
+
# Width for each stage (width of each block in the stage)
|
|
143
|
+
_C.EN.WIDTHS = []
|
|
144
|
+
|
|
145
|
+
# Expansion ratios for MBConv blocks in each stage
|
|
146
|
+
_C.EN.EXP_RATIOS = []
|
|
147
|
+
|
|
148
|
+
# Squeeze-and-Excitation (SE) ratio
|
|
149
|
+
_C.EN.SE_R = 0.25
|
|
150
|
+
|
|
151
|
+
# Strides for each stage (applies to the first block of each stage)
|
|
152
|
+
_C.EN.STRIDES = []
|
|
153
|
+
|
|
154
|
+
# Kernel sizes for each stage
|
|
155
|
+
_C.EN.KERNELS = []
|
|
156
|
+
|
|
157
|
+
# Head width
|
|
158
|
+
_C.EN.HEAD_W = 1280
|
|
159
|
+
|
|
160
|
+
# Drop connect ratio
|
|
161
|
+
_C.EN.DC_RATIO = 0.0
|
|
162
|
+
|
|
163
|
+
# Dropout ratio
|
|
164
|
+
_C.EN.DROPOUT_RATIO = 0.0
|
|
165
|
+
|
|
166
|
+
# ------------------------------------------------------------------------------------ #
|
|
167
|
+
# Batch norm options
|
|
168
|
+
# ------------------------------------------------------------------------------------ #
|
|
169
|
+
_C.BN = CfgNode()
|
|
170
|
+
|
|
171
|
+
# BN epsilon
|
|
172
|
+
_C.BN.EPS = 1e-5
|
|
173
|
+
|
|
174
|
+
# BN momentum (BN momentum in PyTorch = 1 - BN momentum in Caffe2)
|
|
175
|
+
_C.BN.MOM = 0.1
|
|
176
|
+
|
|
177
|
+
# Precise BN stats
|
|
178
|
+
_C.BN.USE_PRECISE_STATS = True
|
|
179
|
+
_C.BN.NUM_SAMPLES_PRECISE = 8192
|
|
180
|
+
|
|
181
|
+
# Initialize the gamma of the final BN of each block to zero
|
|
182
|
+
_C.BN.ZERO_INIT_FINAL_GAMMA = False
|
|
183
|
+
|
|
184
|
+
# Use a different weight decay for BN layers
|
|
185
|
+
_C.BN.USE_CUSTOM_WEIGHT_DECAY = False
|
|
186
|
+
_C.BN.CUSTOM_WEIGHT_DECAY = 0.0
|
|
187
|
+
|
|
188
|
+
# ------------------------------------------------------------------------------------ #
|
|
189
|
+
# Optimizer options
|
|
190
|
+
# ------------------------------------------------------------------------------------ #
|
|
191
|
+
_C.OPTIM = CfgNode()
|
|
192
|
+
|
|
193
|
+
# Base learning rate
|
|
194
|
+
_C.OPTIM.BASE_LR = 0.1
|
|
195
|
+
|
|
196
|
+
# Learning rate policy select from {'cos', 'exp', 'steps'}
|
|
197
|
+
_C.OPTIM.LR_POLICY = "cos"
|
|
198
|
+
|
|
199
|
+
# Exponential decay factor
|
|
200
|
+
_C.OPTIM.GAMMA = 0.1
|
|
201
|
+
|
|
202
|
+
# Steps for 'steps' policy (in epochs)
|
|
203
|
+
_C.OPTIM.STEPS = []
|
|
204
|
+
|
|
205
|
+
# Learning rate multiplier for 'steps' policy
|
|
206
|
+
_C.OPTIM.LR_MULT = 0.1
|
|
207
|
+
|
|
208
|
+
# Maximal number of epochs
|
|
209
|
+
_C.OPTIM.MAX_EPOCH = 200
|
|
210
|
+
|
|
211
|
+
# Momentum
|
|
212
|
+
_C.OPTIM.MOMENTUM = 0.9
|
|
213
|
+
|
|
214
|
+
# Momentum dampening
|
|
215
|
+
_C.OPTIM.DAMPENING = 0.0
|
|
216
|
+
|
|
217
|
+
# Nesterov momentum
|
|
218
|
+
_C.OPTIM.NESTEROV = True
|
|
219
|
+
|
|
220
|
+
# L2 regularization
|
|
221
|
+
_C.OPTIM.WEIGHT_DECAY = 5e-4
|
|
222
|
+
|
|
223
|
+
# Start the warm up from OPTIM.BASE_LR * OPTIM.WARMUP_FACTOR
|
|
224
|
+
_C.OPTIM.WARMUP_FACTOR = 0.1
|
|
225
|
+
|
|
226
|
+
# Gradually warm up the OPTIM.BASE_LR over this number of epochs
|
|
227
|
+
_C.OPTIM.WARMUP_ITERS = 0
|
|
228
|
+
|
|
229
|
+
# ------------------------------------------------------------------------------------ #
|
|
230
|
+
# Training options
|
|
231
|
+
# ------------------------------------------------------------------------------------ #
|
|
232
|
+
_C.TRAIN = CfgNode()
|
|
233
|
+
|
|
234
|
+
# Dataset and split
|
|
235
|
+
_C.TRAIN.DATASET = ""
|
|
236
|
+
_C.TRAIN.SPLIT = "train"
|
|
237
|
+
|
|
238
|
+
# Total mini-batch size
|
|
239
|
+
_C.TRAIN.BATCH_SIZE = 128
|
|
240
|
+
|
|
241
|
+
# Image size
|
|
242
|
+
_C.TRAIN.IM_SIZE = 224
|
|
243
|
+
|
|
244
|
+
# Evaluate model on test data every eval period epochs
|
|
245
|
+
_C.TRAIN.EVAL_PERIOD = 1
|
|
246
|
+
|
|
247
|
+
# Save model checkpoint every checkpoint period epochs
|
|
248
|
+
_C.TRAIN.CHECKPOINT_PERIOD = 1
|
|
249
|
+
|
|
250
|
+
# Resume training from the latest checkpoint in the output directory
|
|
251
|
+
_C.TRAIN.AUTO_RESUME = True
|
|
252
|
+
|
|
253
|
+
# Weights to start training from
|
|
254
|
+
_C.TRAIN.WEIGHTS = ""
|
|
255
|
+
|
|
256
|
+
# ------------------------------------------------------------------------------------ #
|
|
257
|
+
# Testing options
|
|
258
|
+
# ------------------------------------------------------------------------------------ #
|
|
259
|
+
_C.TEST = CfgNode()
|
|
260
|
+
|
|
261
|
+
# Dataset and split
|
|
262
|
+
_C.TEST.DATASET = ""
|
|
263
|
+
_C.TEST.SPLIT = "val"
|
|
264
|
+
|
|
265
|
+
# Total mini-batch size
|
|
266
|
+
_C.TEST.BATCH_SIZE = 200
|
|
267
|
+
|
|
268
|
+
# Image size
|
|
269
|
+
_C.TEST.IM_SIZE = 256
|
|
270
|
+
|
|
271
|
+
# Weights to use for testing
|
|
272
|
+
_C.TEST.WEIGHTS = ""
|
|
273
|
+
|
|
274
|
+
# ------------------------------------------------------------------------------------ #
|
|
275
|
+
# Common train/test data loader options
|
|
276
|
+
# ------------------------------------------------------------------------------------ #
|
|
277
|
+
_C.DATA_LOADER = CfgNode()
|
|
278
|
+
|
|
279
|
+
# Number of data loader workers per process
|
|
280
|
+
_C.DATA_LOADER.NUM_WORKERS = 8
|
|
281
|
+
|
|
282
|
+
# Load data to pinned host memory
|
|
283
|
+
_C.DATA_LOADER.PIN_MEMORY = True
|
|
284
|
+
|
|
285
|
+
# ------------------------------------------------------------------------------------ #
|
|
286
|
+
# Memory options
|
|
287
|
+
# ------------------------------------------------------------------------------------ #
|
|
288
|
+
_C.MEM = CfgNode()
|
|
289
|
+
|
|
290
|
+
# Perform ReLU inplace
|
|
291
|
+
_C.MEM.RELU_INPLACE = True
|
|
292
|
+
|
|
293
|
+
# ------------------------------------------------------------------------------------ #
|
|
294
|
+
# CUDNN options
|
|
295
|
+
# ------------------------------------------------------------------------------------ #
|
|
296
|
+
_C.CUDNN = CfgNode()
|
|
297
|
+
|
|
298
|
+
# Perform benchmarking to select the fastest CUDNN algorithms to use
|
|
299
|
+
# Note that this may increase the memory usage and will likely not result
|
|
300
|
+
# in overall speedups when variable size inputs are used (e.g. COCO training)
|
|
301
|
+
_C.CUDNN.BENCHMARK = True
|
|
302
|
+
|
|
303
|
+
# ------------------------------------------------------------------------------------ #
|
|
304
|
+
# Precise timing options
|
|
305
|
+
# ------------------------------------------------------------------------------------ #
|
|
306
|
+
_C.PREC_TIME = CfgNode()
|
|
307
|
+
|
|
308
|
+
# Number of iterations to warm up the caches
|
|
309
|
+
_C.PREC_TIME.WARMUP_ITER = 3
|
|
310
|
+
|
|
311
|
+
# Number of iterations to compute avg time
|
|
312
|
+
_C.PREC_TIME.NUM_ITER = 30
|
|
313
|
+
|
|
314
|
+
# ------------------------------------------------------------------------------------ #
|
|
315
|
+
# Misc options
|
|
316
|
+
# ------------------------------------------------------------------------------------ #
|
|
317
|
+
|
|
318
|
+
# Number of GPUs to use (applies to both training and testing)
|
|
319
|
+
_C.NUM_GPUS = 1
|
|
320
|
+
|
|
321
|
+
# Output directory
|
|
322
|
+
_C.OUT_DIR = "/tmp"
|
|
323
|
+
|
|
324
|
+
# Config destination (in OUT_DIR)
|
|
325
|
+
_C.CFG_DEST = "config.yaml"
|
|
326
|
+
|
|
327
|
+
# Note that non-determinism may still be present due to non-deterministic
|
|
328
|
+
# operator implementations in GPU operator libraries
|
|
329
|
+
_C.RNG_SEED = 1
|
|
330
|
+
|
|
331
|
+
# Log destination ('stdout' or 'file')
|
|
332
|
+
_C.LOG_DEST = "stdout"
|
|
333
|
+
|
|
334
|
+
# Log period in iters
|
|
335
|
+
_C.LOG_PERIOD = 10
|
|
336
|
+
|
|
337
|
+
# Distributed backend
|
|
338
|
+
_C.DIST_BACKEND = "nccl"
|
|
339
|
+
|
|
340
|
+
# Hostname and port range for multi-process groups (actual port selected randomly)
|
|
341
|
+
_C.HOST = "localhost"
|
|
342
|
+
_C.PORT_RANGE = [10000, 65000]
|
|
343
|
+
|
|
344
|
+
# Models weights referred to by URL are downloaded to this local cache
|
|
345
|
+
_C.DOWNLOAD_CACHE = "/tmp/pycls-download-cache"
|
|
346
|
+
|
|
347
|
+
# ------------------------------------------------------------------------------------ #
|
|
348
|
+
# Deprecated keys
|
|
349
|
+
# ------------------------------------------------------------------------------------ #
|
|
350
|
+
|
|
351
|
+
_C.register_deprecated_key("PREC_TIME.BATCH_SIZE")
|
|
352
|
+
_C.register_deprecated_key("PREC_TIME.ENABLED")
|
|
353
|
+
_C.register_deprecated_key("PORT")
|
|
354
|
+
|
|
355
|
+
|
|
356
|
+
def assert_and_infer_cfg():
|
|
357
|
+
"""Checks config values invariants."""
|
|
358
|
+
err_str = "The first lr step must start at 0"
|
|
359
|
+
assert not _C.OPTIM.STEPS or _C.OPTIM.STEPS[0] == 0, err_str
|
|
360
|
+
data_splits = ["train", "val", "test"]
|
|
361
|
+
err_str = "Data split '{}' not supported"
|
|
362
|
+
assert _C.TRAIN.SPLIT in data_splits, err_str.format(_C.TRAIN.SPLIT)
|
|
363
|
+
assert _C.TEST.SPLIT in data_splits, err_str.format(_C.TEST.SPLIT)
|
|
364
|
+
err_str = "Mini-batch size should be a multiple of NUM_GPUS."
|
|
365
|
+
assert _C.TRAIN.BATCH_SIZE % _C.NUM_GPUS == 0, err_str
|
|
366
|
+
assert _C.TEST.BATCH_SIZE % _C.NUM_GPUS == 0, err_str
|
|
367
|
+
err_str = "Log destination '{}' not supported"
|
|
368
|
+
assert _C.LOG_DEST in ["stdout", "file"], err_str.format(_C.LOG_DEST)
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
def dump_cfg():
|
|
372
|
+
"""Dumps the config to the output directory."""
|
|
373
|
+
cfg_file = os.path.join(_C.OUT_DIR, _C.CFG_DEST)
|
|
374
|
+
with open(cfg_file, "w") as f:
|
|
375
|
+
_C.dump(stream=f)
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
def load_cfg(out_dir, cfg_dest="config.yaml"):
|
|
379
|
+
"""Loads config from specified output directory."""
|
|
380
|
+
cfg_file = os.path.join(out_dir, cfg_dest)
|
|
381
|
+
_C.merge_from_file(cfg_file)
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
def load_cfg_fom_args(description="Config file options."):
|
|
385
|
+
"""Load config from command line arguments and set any specified options."""
|
|
386
|
+
parser = argparse.ArgumentParser(description=description)
|
|
387
|
+
help_s = "Config file location"
|
|
388
|
+
parser.add_argument("--cfg", dest="cfg_file", help=help_s, required=True, type=str)
|
|
389
|
+
help_s = "See pycls/core/config.py for all options"
|
|
390
|
+
parser.add_argument("opts", help=help_s, default=None, nargs=argparse.REMAINDER)
|
|
391
|
+
if len(sys.argv) == 1:
|
|
392
|
+
parser.print_help()
|
|
393
|
+
sys.exit(1)
|
|
394
|
+
args = parser.parse_args()
|
|
395
|
+
_C.merge_from_file(args.cfg_file)
|
|
396
|
+
_C.merge_from_list(args.opts)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 32
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [1, 2, 2, 3, 3, 4, 1]
|
|
8
|
+
WIDTHS: [16, 24, 40, 80, 112, 192, 320]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 1280
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.4
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 224
|
|
21
|
+
BATCH_SIZE: 256
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 256
|
|
25
|
+
BATCH_SIZE: 200
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 32
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [2, 3, 3, 4, 4, 5, 2]
|
|
8
|
+
WIDTHS: [16, 24, 40, 80, 112, 192, 320]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 1280
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.4
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 240
|
|
21
|
+
BATCH_SIZE: 256
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 274
|
|
25
|
+
BATCH_SIZE: 200
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 32
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [2, 3, 3, 4, 4, 5, 2]
|
|
8
|
+
WIDTHS: [16, 24, 48, 88, 120, 208, 352]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 1408
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.4
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 260
|
|
21
|
+
BATCH_SIZE: 256
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 298
|
|
25
|
+
BATCH_SIZE: 200
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 40
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [2, 3, 3, 5, 5, 6, 2]
|
|
8
|
+
WIDTHS: [24, 32, 48, 96, 136, 232, 384]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 1536
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.4
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 300
|
|
21
|
+
BATCH_SIZE: 256
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 342
|
|
25
|
+
BATCH_SIZE: 200
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 48
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [2, 4, 4, 6, 6, 8, 2]
|
|
8
|
+
WIDTHS: [24, 32, 56, 112, 160, 272, 448]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 1792
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.2
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 380
|
|
21
|
+
BATCH_SIZE: 128
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 434
|
|
25
|
+
BATCH_SIZE: 104
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
MODEL:
|
|
2
|
+
TYPE: effnet
|
|
3
|
+
NUM_CLASSES: 1000
|
|
4
|
+
EN:
|
|
5
|
+
STEM_W: 48
|
|
6
|
+
STRIDES: [1, 2, 2, 2, 1, 2, 1]
|
|
7
|
+
DEPTHS: [3, 5, 5, 7, 7, 9, 3]
|
|
8
|
+
WIDTHS: [24, 40, 64, 128, 176, 304, 512]
|
|
9
|
+
EXP_RATIOS: [1, 6, 6, 6, 6, 6, 6]
|
|
10
|
+
KERNELS: [3, 3, 5, 3, 5, 5, 3]
|
|
11
|
+
HEAD_W: 2048
|
|
12
|
+
OPTIM:
|
|
13
|
+
LR_POLICY: cos
|
|
14
|
+
BASE_LR: 0.1
|
|
15
|
+
MAX_EPOCH: 100
|
|
16
|
+
MOMENTUM: 0.9
|
|
17
|
+
WEIGHT_DECAY: 1e-5
|
|
18
|
+
TRAIN:
|
|
19
|
+
DATASET: imagenet
|
|
20
|
+
IM_SIZE: 456
|
|
21
|
+
BATCH_SIZE: 64
|
|
22
|
+
TEST:
|
|
23
|
+
DATASET: imagenet
|
|
24
|
+
IM_SIZE: 522
|
|
25
|
+
BATCH_SIZE: 48
|
|
26
|
+
NUM_GPUS: 8
|
|
27
|
+
OUT_DIR: .
|