deepvisiontools 0.2.0__tar.gz → 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/PKG-INFO +222 -37
- deepvisiontools-1.0.0/README.md +198 -0
- deepvisiontools-1.0.0/pyproject.toml +177 -0
- deepvisiontools-1.0.0/src/deepvisiontools/__init__.py +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/cli.py +127 -0
- deepvisiontools-1.0.0/src/deepvisiontools/config/__init__.py +23 -0
- deepvisiontools-1.0.0/src/deepvisiontools/config/config.py +474 -0
- deepvisiontools-1.0.0/src/deepvisiontools/data/__init__.py +18 -0
- deepvisiontools-1.0.0/src/deepvisiontools/data/data.py +1913 -0
- deepvisiontools-1.0.0/src/deepvisiontools/data/data_registry.py +23 -0
- deepvisiontools-1.0.0/src/deepvisiontools/data/operators.py +188 -0
- deepvisiontools-1.0.0/src/deepvisiontools/data/ops_registry.py +1253 -0
- deepvisiontools-1.0.0/src/deepvisiontools/datasets/__init__.py +43 -0
- deepvisiontools-1.0.0/src/deepvisiontools/datasets/additional_augmentations.py +764 -0
- deepvisiontools-1.0.0/src/deepvisiontools/datasets/base.py +971 -0
- deepvisiontools-1.0.0/src/deepvisiontools/datasets/coco_dataset.py +528 -0
- deepvisiontools-1.0.0/src/deepvisiontools/datasets/semantic_dataset.py +142 -0
- deepvisiontools-1.0.0/src/deepvisiontools/download_demo_datasets.py +222 -0
- deepvisiontools-1.0.0/src/deepvisiontools/download_tutorials.py +143 -0
- deepvisiontools-1.0.0/src/deepvisiontools/evaluation/__init__.py +3 -0
- deepvisiontools-1.0.0/src/deepvisiontools/evaluation/evaluator.py +615 -0
- deepvisiontools-1.0.0/src/deepvisiontools/evaluation/writers.py +212 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/__init__.py +3 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/nms.py +153 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/predictor.py +1033 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/__init__.py +12 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/base.py +117 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/detection.py +179 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/instance.py +290 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/semantic.py +198 -0
- deepvisiontools-1.0.0/src/deepvisiontools/inference/tiling.py +103 -0
- deepvisiontools-1.0.0/src/deepvisiontools/install_dcnv3.py +288 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/__init__.py +15 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/accumulators.py +1160 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/engines.py +1018 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/factories.py +163 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/metrics_core.py +142 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/per_sample_engine.py +356 -0
- deepvisiontools-1.0.0/src/deepvisiontools/metrics/suites.py +338 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/__init__.py +30 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/base/basemodel.py +1007 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/base/checkpoints.py +719 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/base/protocols.py +73 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/__init__.py +19 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/detector.py +459 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/detector_seg.py +469 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/__init__.py +2 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/backbones/backbones.py +619 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/commonblocks.py +650 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/headregistry.py +83 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/neckregistry.py +58 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/outputs.py +950 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/specs.py +39 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/utils.py +59 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/config.py +553 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_maskrcnn.yaml +106 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_rcnn.yaml +73 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_maskrcnn.yaml +107 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_rcnn.yaml +74 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_maskrcnn.yaml +107 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_rcnn.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_maskrcnn.yaml +108 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_rcnn.yaml +73 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_maskrcnn.yaml +107 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_rcnn.yaml +73 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_maskrcnn.yaml +108 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_rcnn.yaml +73 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_vfnet_stardcn.yaml +22 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_rcnn.yaml +67 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_vfnet_stardcn.yaml +19 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_rcnn.yaml +67 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-huge-plus-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-huge-plus-patch16-dinov3_cascade_rcnn.yaml +67 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_maskrcnn.yaml +140 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_rcnn.yaml +108 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_vfnet.yaml +76 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_cascade_rcnn.yaml +116 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_vfnet.yaml +85 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/yamlutils.py +317 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/detectors.py +518 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/tabdets.py +561 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/headblocks.py +1086 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/heads.py +2615 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/losses.py +1791 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/lossutils.py +422 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/neckblocks.py +237 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/necks.py +799 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/tiling/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/tiling/tiling.py +238 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/tab_seg.py +436 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/tabdet.py +444 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/device_amp_helpers.py +78 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/preprocess_helpers.py +31 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/smp/__init__.py +10 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/smp/smp.py +601 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/yolo/__init__.py +19 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/yolo/yolo.py +961 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/yoloseg/__init__.py +19 -0
- deepvisiontools-1.0.0/src/deepvisiontools/models/yoloseg/yoloseg.py +1165 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/__init__.py +56 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/configregistry.py +371 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/__init__.py +0 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_rcnn_default_config.yaml +74 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_vfnet_stardcn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/smp_unet_resnet50_default_config.yaml +79 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11l-seg_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11l_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11m-seg_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11m_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11n-seg_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11n_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11x-seg_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11x_default_config.yaml +77 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/ema.py +266 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/hooks.py +1501 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/llrd.py +1035 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/loggers.py +668 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/optuna_wrapper.py +3013 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/trainconfig.py +2172 -0
- deepvisiontools-1.0.0/src/deepvisiontools/train/trainer.py +2677 -0
- deepvisiontools-1.0.0/src/deepvisiontools/utils/__init__.py +11 -0
- deepvisiontools-1.0.0/src/deepvisiontools/utils/image_and_mask.py +165 -0
- deepvisiontools-1.0.0/src/deepvisiontools/utils/logging.py +117 -0
- {deepvisiontools-0.2.0/src/deepvisiontools/preprocessing → deepvisiontools-1.0.0/src/deepvisiontools/utils}/preprocessing.py +20 -9
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/src/deepvisiontools.egg-info/PKG-INFO +222 -37
- deepvisiontools-1.0.0/src/deepvisiontools.egg-info/SOURCES.txt +172 -0
- deepvisiontools-1.0.0/src/deepvisiontools.egg-info/entry_points.txt +3 -0
- deepvisiontools-1.0.0/src/deepvisiontools.egg-info/requires.txt +36 -0
- deepvisiontools-0.2.0/README.md +0 -40
- deepvisiontools-0.2.0/pyproject.toml +0 -50
- deepvisiontools-0.2.0/setup.py +0 -4
- deepvisiontools-0.2.0/src/deepvisiontools/__init__.py +0 -18
- deepvisiontools-0.2.0/src/deepvisiontools/config/__init__.py +0 -3
- deepvisiontools-0.2.0/src/deepvisiontools/config/config.py +0 -179
- deepvisiontools-0.2.0/src/deepvisiontools/config/errors.py +0 -12
- deepvisiontools-0.2.0/src/deepvisiontools/data/__init__.py +0 -24
- deepvisiontools-0.2.0/src/deepvisiontools/data/additional_augmentations.py +0 -201
- deepvisiontools-0.2.0/src/deepvisiontools/data/augmentation_class.py +0 -37
- deepvisiontools-0.2.0/src/deepvisiontools/data/batch_augmentations.py +0 -211
- deepvisiontools-0.2.0/src/deepvisiontools/data/data_reader/__init__.py +0 -3
- deepvisiontools-0.2.0/src/deepvisiontools/data/data_reader/readers.py +0 -490
- deepvisiontools-0.2.0/src/deepvisiontools/data/dataset.py +0 -359
- deepvisiontools-0.2.0/src/deepvisiontools/data/errors.py +0 -23
- deepvisiontools-0.2.0/src/deepvisiontools/formats/__init__.py +0 -46
- deepvisiontools-0.2.0/src/deepvisiontools/formats/base_data.py +0 -822
- deepvisiontools-0.2.0/src/deepvisiontools/formats/base_formats.py +0 -326
- deepvisiontools-0.2.0/src/deepvisiontools/formats/errors.py +0 -167
- deepvisiontools-0.2.0/src/deepvisiontools/formats/formats.py +0 -282
- deepvisiontools-0.2.0/src/deepvisiontools/formats/utils.py +0 -174
- deepvisiontools-0.2.0/src/deepvisiontools/inference/__init__.py +0 -5
- deepvisiontools-0.2.0/src/deepvisiontools/inference/evaluator.py +0 -256
- deepvisiontools-0.2.0/src/deepvisiontools/inference/patchifier.py +0 -343
- deepvisiontools-0.2.0/src/deepvisiontools/inference/predictor.py +0 -245
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/__init__.py +0 -50
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/available_metrics.py +0 -215
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/base_metric.py +0 -683
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/func.py +0 -36
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/matcher.py +0 -99
- deepvisiontools-0.2.0/src/deepvisiontools/metrics/utils.py +0 -39
- deepvisiontools-0.2.0/src/deepvisiontools/models/__init__.py +0 -16
- deepvisiontools-0.2.0/src/deepvisiontools/models/basemodel.py +0 -100
- deepvisiontools-0.2.0/src/deepvisiontools/models/mask2former/__init__.py +0 -3
- deepvisiontools-0.2.0/src/deepvisiontools/models/mask2former/mask2former.py +0 -285
- deepvisiontools-0.2.0/src/deepvisiontools/models/smp/errors.py +0 -4
- deepvisiontools-0.2.0/src/deepvisiontools/models/smp/smp.py +0 -149
- deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/__init__.py +0 -4
- deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/errors.py +0 -5
- deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/timmyolo.py +0 -392
- deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/utils.py +0 -230
- deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/__init__.py +0 -15
- deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/errors.py +0 -25
- deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/utils.py +0 -92
- deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/yolo.py +0 -314
- deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/__init__.py +0 -4
- deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/errors.py +0 -14
- deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/utils.py +0 -135
- deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/yoloseg.py +0 -391
- deepvisiontools-0.2.0/src/deepvisiontools/preprocessing/__init__.py +0 -19
- deepvisiontools-0.2.0/src/deepvisiontools/preprocessing/image.py +0 -79
- deepvisiontools-0.2.0/src/deepvisiontools/train/__init__.py +0 -3
- deepvisiontools-0.2.0/src/deepvisiontools/train/trainer.py +0 -355
- deepvisiontools-0.2.0/src/deepvisiontools/utils/__init__.py +0 -3
- deepvisiontools-0.2.0/src/deepvisiontools/utils/visualization.py +0 -318
- deepvisiontools-0.2.0/src/deepvisiontools.egg-info/SOURCES.txt +0 -64
- deepvisiontools-0.2.0/src/deepvisiontools.egg-info/requires.txt +0 -10
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/LICENSE.txt +0 -0
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/setup.cfg +0 -0
- {deepvisiontools-0.2.0/src/deepvisiontools/models/smp → deepvisiontools-1.0.0/src/deepvisiontools/models/base}/__init__.py +0 -0
- /deepvisiontools-0.2.0/src/deepvisiontools/utils/errors.py → /deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/backbones/__init__.py +0 -0
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/src/deepvisiontools.egg-info/dependency_links.txt +0 -0
- {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/src/deepvisiontools.egg-info/top_level.txt +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepvisiontools
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
5
|
-
Author-email: Lucas Bernigaud Samatan <lucas.bernigaud-samatan@inrae.fr>, Jordan Bernigaud Samatan <jordan.bernigaud-samatan@inrae.fr
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: deepvisiontools is a library built on torch for training and inference processes for deep learning computer vision tasks.
|
|
5
|
+
Author-email: Lucas Bernigaud Samatan <lucas.bernigaud-samatan@inrae.fr>, Jordan Bernigaud Samatan <jordan.bernigaud-samatan@inrae.fr>
|
|
6
6
|
Maintainer-email: Jordan Bernigaud Samatan <jordan.bernigaud-samatan@inrae.fr>, Lucas Bernigaud Samatan <lucas.bernigaud-samatan@inrae.fr>
|
|
7
7
|
License: GNU AFFERO GENERAL PUBLIC LICENSE
|
|
8
8
|
Version 3, 19 November 2007
|
|
@@ -666,65 +666,250 @@ License: GNU AFFERO GENERAL PUBLIC LICENSE
|
|
|
666
666
|
For more information on this, and how to apply and follow the GNU AGPL, see
|
|
667
667
|
<https://www.gnu.org/licenses/>.
|
|
668
668
|
|
|
669
|
-
Project-URL: Homepage, https://
|
|
670
|
-
Project-URL: Issues, https://
|
|
671
|
-
Project-URL:
|
|
672
|
-
Project-URL:
|
|
673
|
-
Classifier: Development Status ::
|
|
669
|
+
Project-URL: Homepage, https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
|
|
670
|
+
Project-URL: Issues, https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools/-/issues
|
|
671
|
+
Project-URL: Repository, https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
|
|
672
|
+
Project-URL: Documentation, https://deepvisiontools-1233bd.pages-forge.inrae.fr/
|
|
673
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
674
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
674
675
|
Classifier: Programming Language :: Python :: 3.11
|
|
675
676
|
Classifier: Programming Language :: Python :: 3.12
|
|
676
|
-
|
|
677
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
678
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
679
|
+
Requires-Python: <3.15,>=3.10
|
|
677
680
|
Description-Content-Type: text/markdown
|
|
678
681
|
License-File: LICENSE.txt
|
|
679
|
-
Requires-Dist: torch
|
|
680
|
-
Requires-Dist: torchvision
|
|
681
|
-
Requires-Dist: pycocotools
|
|
682
|
-
Requires-Dist: torchmetrics
|
|
683
|
-
Requires-Dist: tensorboard
|
|
684
|
-
Requires-Dist:
|
|
685
|
-
Requires-Dist:
|
|
686
|
-
Requires-Dist:
|
|
687
|
-
Requires-Dist:
|
|
688
|
-
Requires-Dist:
|
|
682
|
+
Requires-Dist: torch<3.0,>=2.4.0
|
|
683
|
+
Requires-Dist: torchvision<1.0,>=0.19.0
|
|
684
|
+
Requires-Dist: pycocotools<3.0,>=2.0.8
|
|
685
|
+
Requires-Dist: torchmetrics<2.0,>=1.4.0
|
|
686
|
+
Requires-Dist: tensorboard<3.0,>=2.4.1
|
|
687
|
+
Requires-Dist: torch-tb-profiler<1.0,>=0.4.0
|
|
688
|
+
Requires-Dist: mlflow<4.0,>=3.1.0
|
|
689
|
+
Requires-Dist: fastapi!=0.136.3,<1.0
|
|
690
|
+
Requires-Dist: starlette<2.0,>=1.0.1
|
|
691
|
+
Requires-Dist: ultralytics<9.0,>=8.3.28
|
|
692
|
+
Requires-Dist: transformers<6.0,>=5.0.0
|
|
693
|
+
Requires-Dist: colorcet<4.0,>=3.1.0
|
|
694
|
+
Requires-Dist: segmentation-models-pytorch<1.0,>=0.4.1
|
|
695
|
+
Requires-Dist: openpyxl<4.0,>=3.1.5
|
|
696
|
+
Requires-Dist: optuna<5.0,>=4.0.0
|
|
697
|
+
Requires-Dist: optuna-dashboard<1.0,>=0.20.0
|
|
698
|
+
Requires-Dist: huggingface_hub<2.0,>=1.5.0
|
|
699
|
+
Requires-Dist: pillow<13.0,>=12.2.0
|
|
700
|
+
Requires-Dist: setuptools<82,>=78.1.1
|
|
701
|
+
Provides-Extra: dev
|
|
702
|
+
Requires-Dist: pytest<10.0,>=9.0; extra == "dev"
|
|
703
|
+
Requires-Dist: pytest-cov<8.0,>=7.0; extra == "dev"
|
|
704
|
+
Requires-Dist: coverage[toml]<8.0,>=7.0; extra == "dev"
|
|
705
|
+
Requires-Dist: hypothesis<7.0,>=6.0; extra == "dev"
|
|
706
|
+
Requires-Dist: ruff<1.0,>=0.13.0; extra == "dev"
|
|
707
|
+
Requires-Dist: mypy<2.0,>=1.0; extra == "dev"
|
|
708
|
+
Requires-Dist: bandit[toml]<2.0,>=1.7; extra == "dev"
|
|
709
|
+
Requires-Dist: pip-audit<3.0,>=2.7; extra == "dev"
|
|
710
|
+
Requires-Dist: nox[pbs]<2027.0.0,>=2025.0.0; extra == "dev"
|
|
711
|
+
Requires-Dist: build<2.0,>=1.2; extra == "dev"
|
|
712
|
+
Requires-Dist: twine<7.0,>=6.0; extra == "dev"
|
|
713
|
+
Requires-Dist: types-PyYAML<7.0,>=6.0.12; extra == "dev"
|
|
714
|
+
Provides-Extra: internimage-build
|
|
715
|
+
Requires-Dist: huggingface_hub<1.0,>=0.24.0; extra == "internimage-build"
|
|
689
716
|
Dynamic: license-file
|
|
690
717
|
|
|
691
|
-
<!--
|
|
692
718
|
<p align="center">
|
|
693
|
-
<img src="
|
|
719
|
+
<img align="center" src="supplementary/logo-dvt.png" height="100">
|
|
694
720
|
</p>
|
|
695
|
-
-->
|
|
696
721
|
|
|
697
|
-
|
|
698
|
-
deepvisiontools
|
|
699
|
-
</h1>
|
|
722
|
+
# Welcome to deepvisiontools!
|
|
700
723
|
|
|
724
|
+
**deepvisiontools** is a library built on torch for training and inference processes for deep learning computer vision tasks.
|
|
701
725
|
|
|
702
|
-
|
|
726
|
+
<p align="center">
|
|
727
|
+
<img align="center" src="supplementary/coco_visu.png" height="130"> <img align="center" src="supplementary/veg_visu.png" height="130"> <img align="center" src="supplementary/dice_visu.png" height="130">
|
|
728
|
+
</p>
|
|
729
|
+
|
|
730
|
+
## News
|
|
731
|
+
|
|
732
|
+
- *release 1.0.0: detector / detector-seg / tabdet / tabdet-seg model wrappers are heavy but powerful models for detection and instance segmentation. However, they are not fully pretrained (only backbone on imagenet). Therefore, on small datasets (< 1000 images ish, but depend on the dataset ...) they can be slightly less competitive than yolo models (also included in the library) that were fully pretrained on coco. We are currently pretraining some of the models but it takes time. We are goind to update the weights once done, so keep tuned for new releases. We suggest you always train a yolo model as well for a baseline comparison. However, on larger datasets they can significantly outperform yolo11x, but again it depends on the dataset ...*
|
|
733
|
+
|
|
734
|
+
## Scope
|
|
735
|
+
|
|
736
|
+
deepvisiontools is suitable for supervised learning computer vision tasks. Tasks currently available are:
|
|
737
|
+
|
|
738
|
+
- detection (bounding boxes)
|
|
739
|
+
- instance segmentation (object instance masks)
|
|
740
|
+
- semantic segmentation (semantic masks)
|
|
741
|
+
|
|
742
|
+
Future releases will include:
|
|
743
|
+
|
|
744
|
+
- classification
|
|
745
|
+
- regression
|
|
746
|
+
- keypoints/pose detection
|
|
747
|
+
- crowd detection (point detection)
|
|
748
|
+
|
|
749
|
+
deepvisiontools provides integrated pipelines that include dataset handlers, model wrappers, training and hyper-parameter fine-tuning helpers, metrics, inference and evaluation tools.
|
|
703
750
|
|
|
704
|
-
|
|
751
|
+
deepvisiontools is designed for both **non-expert and expert** users by providing default operational frameworks that are easy to use, while keeping maximal flexibility and control for experts.
|
|
705
752
|
|
|
706
|
-
|
|
753
|
+
|
|
754
|
+
## Context
|
|
755
|
+
|
|
756
|
+
deepvisiontools is developed by INRAE, the French National Research Institute for Agriculture, Food and the Environment. It was partly supported by the [PHENOME-EMPHASIS project](https://www.phenome-emphasis.fr/). It is associated with INRAE CATI CONNECT.
|
|
707
757
|
|
|
708
758
|
## Citations
|
|
709
759
|
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
760
|
+
To cite deepvisiontools when used, please cite the official repository: https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
|
|
761
|
+
|
|
762
|
+
**Important**: deepvisiontools provides model wrappers and does not reimplement all models. It is the responsibility of the user to also cite the model developers.
|
|
763
|
+
|
|
764
|
+
If you are using one of these models, please cite the corresponding library as well:
|
|
765
|
+
|
|
766
|
+
- `"yolo"`: cite Ultralytics (https://www.ultralytics.com/)
|
|
767
|
+
- `"smp"`: cite segmentation-models-pytorch (https://github.com/qubvel-org/segmentation_models.pytorch)
|
|
714
768
|
|
|
715
|
-
|
|
769
|
+
Note that detector and tabdet models (VFNet, Cascade R-CNN/Mask R-CNN) are deepvisiontools reimplementations using PyTorch Image Models as backbones (https://timm.fast.ai/). They were reimplemented following MMDetection (https://github.com/open-mmlab/mmdetection) guidelines.
|
|
716
770
|
|
|
717
|
-
|
|
771
|
+
Finally, hyper-parameter optimisations were built on Optuna. If you use the OptunaWrapper helper, it is worth mentioning Optuna in your work (https://optuna.org/).
|
|
718
772
|
|
|
719
773
|
## Installation
|
|
720
|
-
We have tested deepvisiontools for python versions between 3.11.9 and 3.12.11, we recommend to use python 3.12.11 to minimize the risk of bugs.
|
|
721
774
|
|
|
722
|
-
|
|
775
|
+
It is recommended to install deepvisiontools on a GPU-enabled machine/server. We suggest that you use a Python virtual environment (uv, conda, venv, etc.) with **Python version between 3.10 and 3.14**.
|
|
776
|
+
|
|
777
|
+
deepvisiontools is available on PyPI, so you can simply run in a Python environment:
|
|
778
|
+
|
|
779
|
+
```bash
|
|
723
780
|
pip install deepvisiontools
|
|
724
781
|
```
|
|
725
|
-
|
|
782
|
+
|
|
783
|
+
To install deepvisiontools in development mode, please clone the repository and run:
|
|
784
|
+
|
|
785
|
+
```bash
|
|
786
|
+
pip install -e deepvisiontools/ # local cloned repo
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
Finally, to install deepvisiontools with developer extras, move inside the cloned repo and run:
|
|
790
|
+
|
|
791
|
+
```bash
|
|
792
|
+
pip install -e ".[dev]"
|
|
793
|
+
```
|
|
794
|
+
|
|
795
|
+
This will include extras like documentation, pytest, nox, etc.
|
|
796
|
+
|
|
797
|
+
## Documentation and tutorials
|
|
798
|
+
|
|
799
|
+
Official documentation for deepvisiontools can be found here: https://deepvisiontools-1233bd.pages-forge.inrae.fr/
|
|
800
|
+
|
|
801
|
+
To get started with deepvisiontools, after installation you can run:
|
|
802
|
+
|
|
803
|
+
```bash
|
|
804
|
+
deepvisiontools download-tutorials
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
You will also need to download the demo datasets:
|
|
808
|
+
|
|
809
|
+
```bash
|
|
810
|
+
deepvisiontools download-demo-datasets
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
The first tutorial, **getting_started**, takes about 1 hour and explains all the basics of deepvisiontools. From there you have all information to get started with simple tasks.
|
|
814
|
+
|
|
815
|
+
We then recommend moving to **advanced_usage** to get a broader view of what you can configure in deepvisiontools and all available helpers.
|
|
816
|
+
|
|
817
|
+
Finally, the **hyper_parametrs_optimization** tutorial will explain the usage of Optuna wrappers available in deepvisiontools to perform extensive parameter space searches.
|
|
818
|
+
|
|
819
|
+
## Monitoring via MLflow
|
|
820
|
+
|
|
821
|
+
deepvisiontools includes MLflow for monitoring, checkpointing and artifacts during training.
|
|
822
|
+
|
|
823
|
+
If you use deepvisiontools as intended, at some point you will end up with an `mlruns` folder.
|
|
824
|
+
|
|
825
|
+
You can use the following command to start MLflow and then open the local page in your browser to display the MLflow UI:
|
|
826
|
+
|
|
827
|
+
```bash
|
|
828
|
+
mlflow server --backend-store-uri sqlite:////$(pwd)/mlruns/mlflow.db --default-artifact-root file:$(pwd)/mlruns --host 127.0.0.1 --port 5000
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
An alternative way for Jupyter notebooks is presented in the tutorial.
|
|
832
|
+
|
|
726
833
|
## License
|
|
727
834
|
|
|
728
835
|
GNU Affero General Public License v3 or later (AGPLv3+) (AGPL-3.0).
|
|
729
836
|
|
|
837
|
+
## Contributor specifics
|
|
838
|
+
|
|
839
|
+
If you wish to contribute as a developer to deepvisiontools, you need to be part of INRAE or PHENOME-EMPHASIS. You can contact jordan.bernigaud-samatan@inrae.fr to discuss your involvement.
|
|
840
|
+
|
|
841
|
+
### Organization and CI
|
|
842
|
+
|
|
843
|
+
The deepvisiontools repository has two protected branches: *main* and *prerelease*. *main* is reserved for official releases, and only maintainers are allowed to merge or push. *prerelease* is used for pre-release validation: the full CI stages are run, but they are non-blocking, which allows checking potential problems or errors before merging into *main*.
|
|
844
|
+
|
|
845
|
+
The deepvisiontools repository has a CI pipeline that includes:
|
|
846
|
+
|
|
847
|
+
- linting / formatting checks with ruff
|
|
848
|
+
- security checks (high-risk issues are blocking only on protected release paths)
|
|
849
|
+
- package build
|
|
850
|
+
- tests (Python 3.10, 3.11, 3.12, 3.13, 3.14)
|
|
851
|
+
- documentation build
|
|
852
|
+
|
|
853
|
+
### Unit and functional tests
|
|
854
|
+
|
|
855
|
+
For contributors, you can run the local series of unit/functional tests. First, install the additional test-related dependencies.
|
|
856
|
+
|
|
857
|
+
We strongly recommend that you run local tests before creating a merge request.
|
|
858
|
+
|
|
859
|
+
#### Run with coverage
|
|
860
|
+
|
|
861
|
+
```bash
|
|
862
|
+
coverage run -m pytest # run tests under coverage
|
|
863
|
+
coverage report -m # text coverage summary
|
|
864
|
+
coverage html # HTML coverage report in htmlcov/index.html
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
#### Running subsets
|
|
868
|
+
|
|
869
|
+
```bash
|
|
870
|
+
pytest tests/unit -q # only unit tests
|
|
871
|
+
pytest tests/functional -q # only functional tests
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
#### Run with nox
|
|
875
|
+
|
|
876
|
+
```bash
|
|
877
|
+
nox -s tests-3.xx # run CPU-only, slow-only tests on a specific Python version: 3.10, 3.11, 3.12, 3.13 or 3.14
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
For example:
|
|
881
|
+
|
|
882
|
+
```bash
|
|
883
|
+
nox -s tests-3.12
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
### Check other CI stages locally
|
|
887
|
+
|
|
888
|
+
Use nox, which is installed if `".[dev]"` was used during installation:
|
|
889
|
+
|
|
890
|
+
```bash
|
|
891
|
+
nox -s ruff # formatting / linting
|
|
892
|
+
nox -s typecheck # type checking with mypy
|
|
893
|
+
nox -s security # security checks with bandit
|
|
894
|
+
nox -s tests-3.xx # CPU-only, non-slow tests on a specific Python version
|
|
895
|
+
nox -s docs # build the docs
|
|
896
|
+
```
|
|
897
|
+
**note that the nox docs session produces a _nox_doc/ folder, so you can inspect the doc locally**
|
|
898
|
+
|
|
899
|
+
### Linting and formatting
|
|
900
|
+
|
|
901
|
+
We suggest that you use ruff during development to maintain code compatibility with the tests. You can use ruff to check linting and formatting:
|
|
902
|
+
|
|
903
|
+
```bash
|
|
904
|
+
ruff check src tests # check linting on src and tests folders
|
|
905
|
+
ruff check --fix src tests # apply safe lint fixes
|
|
906
|
+
ruff format --check src tests # check formatting
|
|
907
|
+
ruff format src tests # apply safe formatting on src and tests folders
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
Even better is to use ruff in your IDE.
|
|
911
|
+
|
|
912
|
+
### release on PyPi
|
|
913
|
+
*Only maintainer can create release with propper tags*
|
|
730
914
|
|
|
915
|
+
To release on pypi you must tag the version from the main branch according to this pattern `"vX.Y.Z"`. The tag version must match the `X.Y.Z` package version of `deepvisiontools.__version__`. Once the tagged is done, you can push on main and the CI release stage will upload the dist to pypi.
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img align="center" src="supplementary/logo-dvt.png" height="100">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# Welcome to deepvisiontools!
|
|
6
|
+
|
|
7
|
+
**deepvisiontools** is a library built on torch for training and inference processes for deep learning computer vision tasks.
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img align="center" src="supplementary/coco_visu.png" height="130"> <img align="center" src="supplementary/veg_visu.png" height="130"> <img align="center" src="supplementary/dice_visu.png" height="130">
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
## News
|
|
14
|
+
|
|
15
|
+
- *release 1.0.0: detector / detector-seg / tabdet / tabdet-seg model wrappers are heavy but powerful models for detection and instance segmentation. However, they are not fully pretrained (only backbone on imagenet). Therefore, on small datasets (< 1000 images ish, but depend on the dataset ...) they can be slightly less competitive than yolo models (also included in the library) that were fully pretrained on coco. We are currently pretraining some of the models but it takes time. We are goind to update the weights once done, so keep tuned for new releases. We suggest you always train a yolo model as well for a baseline comparison. However, on larger datasets they can significantly outperform yolo11x, but again it depends on the dataset ...*
|
|
16
|
+
|
|
17
|
+
## Scope
|
|
18
|
+
|
|
19
|
+
deepvisiontools is suitable for supervised learning computer vision tasks. Tasks currently available are:
|
|
20
|
+
|
|
21
|
+
- detection (bounding boxes)
|
|
22
|
+
- instance segmentation (object instance masks)
|
|
23
|
+
- semantic segmentation (semantic masks)
|
|
24
|
+
|
|
25
|
+
Future releases will include:
|
|
26
|
+
|
|
27
|
+
- classification
|
|
28
|
+
- regression
|
|
29
|
+
- keypoints/pose detection
|
|
30
|
+
- crowd detection (point detection)
|
|
31
|
+
|
|
32
|
+
deepvisiontools provides integrated pipelines that include dataset handlers, model wrappers, training and hyper-parameter fine-tuning helpers, metrics, inference and evaluation tools.
|
|
33
|
+
|
|
34
|
+
deepvisiontools is designed for both **non-expert and expert** users by providing default operational frameworks that are easy to use, while keeping maximal flexibility and control for experts.
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Context
|
|
38
|
+
|
|
39
|
+
deepvisiontools is developed by INRAE, the French National Research Institute for Agriculture, Food and the Environment. It was partly supported by the [PHENOME-EMPHASIS project](https://www.phenome-emphasis.fr/). It is associated with INRAE CATI CONNECT.
|
|
40
|
+
|
|
41
|
+
## Citations
|
|
42
|
+
|
|
43
|
+
To cite deepvisiontools when used, please cite the official repository: https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
|
|
44
|
+
|
|
45
|
+
**Important**: deepvisiontools provides model wrappers and does not reimplement all models. It is the responsibility of the user to also cite the model developers.
|
|
46
|
+
|
|
47
|
+
If you are using one of these models, please cite the corresponding library as well:
|
|
48
|
+
|
|
49
|
+
- `"yolo"`: cite Ultralytics (https://www.ultralytics.com/)
|
|
50
|
+
- `"smp"`: cite segmentation-models-pytorch (https://github.com/qubvel-org/segmentation_models.pytorch)
|
|
51
|
+
|
|
52
|
+
Note that detector and tabdet models (VFNet, Cascade R-CNN/Mask R-CNN) are deepvisiontools reimplementations using PyTorch Image Models as backbones (https://timm.fast.ai/). They were reimplemented following MMDetection (https://github.com/open-mmlab/mmdetection) guidelines.
|
|
53
|
+
|
|
54
|
+
Finally, hyper-parameter optimisations were built on Optuna. If you use the OptunaWrapper helper, it is worth mentioning Optuna in your work (https://optuna.org/).
|
|
55
|
+
|
|
56
|
+
## Installation
|
|
57
|
+
|
|
58
|
+
It is recommended to install deepvisiontools on a GPU-enabled machine/server. We suggest that you use a Python virtual environment (uv, conda, venv, etc.) with **Python version between 3.10 and 3.14**.
|
|
59
|
+
|
|
60
|
+
deepvisiontools is available on PyPI, so you can simply run in a Python environment:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install deepvisiontools
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
To install deepvisiontools in development mode, please clone the repository and run:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install -e deepvisiontools/ # local cloned repo
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Finally, to install deepvisiontools with developer extras, move inside the cloned repo and run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install -e ".[dev]"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
This will include extras like documentation, pytest, nox, etc.
|
|
79
|
+
|
|
80
|
+
## Documentation and tutorials
|
|
81
|
+
|
|
82
|
+
Official documentation for deepvisiontools can be found here: https://deepvisiontools-1233bd.pages-forge.inrae.fr/
|
|
83
|
+
|
|
84
|
+
To get started with deepvisiontools, after installation you can run:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
deepvisiontools download-tutorials
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
You will also need to download the demo datasets:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
deepvisiontools download-demo-datasets
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The first tutorial, **getting_started**, takes about 1 hour and explains all the basics of deepvisiontools. From there you have all information to get started with simple tasks.
|
|
97
|
+
|
|
98
|
+
We then recommend moving to **advanced_usage** to get a broader view of what you can configure in deepvisiontools and all available helpers.
|
|
99
|
+
|
|
100
|
+
Finally, the **hyper_parametrs_optimization** tutorial will explain the usage of Optuna wrappers available in deepvisiontools to perform extensive parameter space searches.
|
|
101
|
+
|
|
102
|
+
## Monitoring via MLflow
|
|
103
|
+
|
|
104
|
+
deepvisiontools includes MLflow for monitoring, checkpointing and artifacts during training.
|
|
105
|
+
|
|
106
|
+
If you use deepvisiontools as intended, at some point you will end up with an `mlruns` folder.
|
|
107
|
+
|
|
108
|
+
You can use the following command to start MLflow and then open the local page in your browser to display the MLflow UI:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
mlflow server --backend-store-uri sqlite:////$(pwd)/mlruns/mlflow.db --default-artifact-root file:$(pwd)/mlruns --host 127.0.0.1 --port 5000
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
An alternative way for Jupyter notebooks is presented in the tutorial.
|
|
115
|
+
|
|
116
|
+
## License
|
|
117
|
+
|
|
118
|
+
GNU Affero General Public License v3 or later (AGPLv3+) (AGPL-3.0).
|
|
119
|
+
|
|
120
|
+
## Contributor specifics
|
|
121
|
+
|
|
122
|
+
If you wish to contribute as a developer to deepvisiontools, you need to be part of INRAE or PHENOME-EMPHASIS. You can contact jordan.bernigaud-samatan@inrae.fr to discuss your involvement.
|
|
123
|
+
|
|
124
|
+
### Organization and CI
|
|
125
|
+
|
|
126
|
+
The deepvisiontools repository has two protected branches: *main* and *prerelease*. *main* is reserved for official releases, and only maintainers are allowed to merge or push. *prerelease* is used for pre-release validation: the full CI stages are run, but they are non-blocking, which allows checking potential problems or errors before merging into *main*.
|
|
127
|
+
|
|
128
|
+
The deepvisiontools repository has a CI pipeline that includes:
|
|
129
|
+
|
|
130
|
+
- linting / formatting checks with ruff
|
|
131
|
+
- security checks (high-risk issues are blocking only on protected release paths)
|
|
132
|
+
- package build
|
|
133
|
+
- tests (Python 3.10, 3.11, 3.12, 3.13, 3.14)
|
|
134
|
+
- documentation build
|
|
135
|
+
|
|
136
|
+
### Unit and functional tests
|
|
137
|
+
|
|
138
|
+
For contributors, you can run the local series of unit/functional tests. First, install the additional test-related dependencies.
|
|
139
|
+
|
|
140
|
+
We strongly recommend that you run local tests before creating a merge request.
|
|
141
|
+
|
|
142
|
+
#### Run with coverage
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
coverage run -m pytest # run tests under coverage
|
|
146
|
+
coverage report -m # text coverage summary
|
|
147
|
+
coverage html # HTML coverage report in htmlcov/index.html
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
#### Running subsets
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
pytest tests/unit -q # only unit tests
|
|
154
|
+
pytest tests/functional -q # only functional tests
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
#### Run with nox
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
nox -s tests-3.xx # run CPU-only, slow-only tests on a specific Python version: 3.10, 3.11, 3.12, 3.13 or 3.14
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
For example:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
nox -s tests-3.12
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Check other CI stages locally
|
|
170
|
+
|
|
171
|
+
Use nox, which is installed if `".[dev]"` was used during installation:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
nox -s ruff # formatting / linting
|
|
175
|
+
nox -s typecheck # type checking with mypy
|
|
176
|
+
nox -s security # security checks with bandit
|
|
177
|
+
nox -s tests-3.xx # CPU-only, non-slow tests on a specific Python version
|
|
178
|
+
nox -s docs # build the docs
|
|
179
|
+
```
|
|
180
|
+
**note that the nox docs session produces a _nox_doc/ folder, so you can inspect the doc locally**
|
|
181
|
+
|
|
182
|
+
### Linting and formatting
|
|
183
|
+
|
|
184
|
+
We suggest that you use ruff during development to maintain code compatibility with the tests. You can use ruff to check linting and formatting:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
ruff check src tests # check linting on src and tests folders
|
|
188
|
+
ruff check --fix src tests # apply safe lint fixes
|
|
189
|
+
ruff format --check src tests # check formatting
|
|
190
|
+
ruff format src tests # apply safe formatting on src and tests folders
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Even better is to use ruff in your IDE.
|
|
194
|
+
|
|
195
|
+
### release on PyPi
|
|
196
|
+
*Only maintainer can create release with propper tags*
|
|
197
|
+
|
|
198
|
+
To release on pypi you must tag the version from the main branch according to this pattern `"vX.Y.Z"`. The tag version must match the `X.Y.Z` package version of `deepvisiontools.__version__`. Once the tagged is done, you can push on main and the CI release stage will upload the dist to pypi.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=78.1.1,<82"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "deepvisiontools"
|
|
7
|
+
description = "deepvisiontools is a library built on torch for training and inference processes for deep learning computer vision tasks."
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
dynamic = ["version"]
|
|
10
|
+
requires-python = ">=3.10,<3.15"
|
|
11
|
+
authors = [
|
|
12
|
+
{ name = "Lucas Bernigaud Samatan", email = "lucas.bernigaud-samatan@inrae.fr" },
|
|
13
|
+
{ name = "Jordan Bernigaud Samatan", email = "jordan.bernigaud-samatan@inrae.fr" },
|
|
14
|
+
]
|
|
15
|
+
maintainers = [
|
|
16
|
+
{ name = "Jordan Bernigaud Samatan", email = "jordan.bernigaud-samatan@inrae.fr" },
|
|
17
|
+
{ name = "Lucas Bernigaud Samatan", email = "lucas.bernigaud-samatan@inrae.fr" },
|
|
18
|
+
]
|
|
19
|
+
classifiers = [
|
|
20
|
+
"Development Status :: 5 - Production/Stable",
|
|
21
|
+
"Programming Language :: Python :: 3.10",
|
|
22
|
+
"Programming Language :: Python :: 3.11",
|
|
23
|
+
"Programming Language :: Python :: 3.12",
|
|
24
|
+
"Programming Language :: Python :: 3.13",
|
|
25
|
+
"Programming Language :: Python :: 3.14",
|
|
26
|
+
]
|
|
27
|
+
license = { file = "LICENSE.txt" }
|
|
28
|
+
|
|
29
|
+
# Runtime dependencies.
|
|
30
|
+
# Policy: allow compatible releases within the same major version.
|
|
31
|
+
# Exception: torch keeps the explicit minimum at 2.4.0.
|
|
32
|
+
dependencies = [
|
|
33
|
+
"torch>=2.4.0,<3.0",
|
|
34
|
+
"torchvision>=0.19.0,<1.0",
|
|
35
|
+
"pycocotools>=2.0.8,<3.0",
|
|
36
|
+
"torchmetrics>=1.4.0,<2.0",
|
|
37
|
+
"tensorboard>=2.4.1,<3.0",
|
|
38
|
+
"torch-tb-profiler>=0.4.0,<1.0",
|
|
39
|
+
"mlflow>=3.1.0,<4.0",
|
|
40
|
+
|
|
41
|
+
# Security constraints for transitive MLflow / dashboard web dependencies.
|
|
42
|
+
# fastapi 0.136.3 is flagged as MAL-2026-4750.
|
|
43
|
+
# starlette <1.0.1 is flagged as PYSEC-2026-161.
|
|
44
|
+
"fastapi!=0.136.3,<1.0",
|
|
45
|
+
"starlette>=1.0.1,<2.0",
|
|
46
|
+
|
|
47
|
+
"ultralytics>=8.3.28,<9.0",
|
|
48
|
+
"transformers>=5.0.0,<6.0",
|
|
49
|
+
"colorcet>=3.1.0,<4.0",
|
|
50
|
+
"segmentation-models-pytorch>=0.4.1,<1.0",
|
|
51
|
+
"openpyxl>=3.1.5,<4.0",
|
|
52
|
+
"optuna>=4.0.0,<5.0",
|
|
53
|
+
"optuna-dashboard>=0.20.0,<1.0",
|
|
54
|
+
"huggingface_hub>=1.5.0,<2.0",
|
|
55
|
+
"pillow>=12.2.0,<13.0",
|
|
56
|
+
"setuptools>=78.1.1,<82",
|
|
57
|
+
]
|
|
58
|
+
|
|
59
|
+
[project.urls]
|
|
60
|
+
Homepage = "https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools"
|
|
61
|
+
Issues = "https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools/-/issues"
|
|
62
|
+
Repository = "https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools"
|
|
63
|
+
Documentation = "https://deepvisiontools-1233bd.pages-forge.inrae.fr/"
|
|
64
|
+
|
|
65
|
+
# Development / CI dependencies.
|
|
66
|
+
# Install locally with: python -m pip install -e ".[dev]"
|
|
67
|
+
[project.optional-dependencies]
|
|
68
|
+
dev = [
|
|
69
|
+
"pytest>=9.0,<10.0",
|
|
70
|
+
"pytest-cov>=7.0,<8.0",
|
|
71
|
+
"coverage[toml]>=7.0,<8.0",
|
|
72
|
+
"hypothesis>=6.0,<7.0",
|
|
73
|
+
"ruff>=0.13.0,<1.0",
|
|
74
|
+
"mypy>=1.0,<2.0",
|
|
75
|
+
"bandit[toml]>=1.7,<2.0",
|
|
76
|
+
"pip-audit>=2.7,<3.0",
|
|
77
|
+
"nox[pbs]>=2025.0.0,<2027.0.0",
|
|
78
|
+
"build>=1.2,<2.0",
|
|
79
|
+
"twine>=6.0,<7.0",
|
|
80
|
+
"types-PyYAML>=6.0.12,<7.0",
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
internimage-build = [
|
|
84
|
+
"huggingface_hub>=0.24.0,<1.0",
|
|
85
|
+
]
|
|
86
|
+
|
|
87
|
+
# Setuptools config: discover the package from src/.
|
|
88
|
+
[tool.setuptools.packages.find]
|
|
89
|
+
where = ["src"]
|
|
90
|
+
|
|
91
|
+
[project.scripts]
|
|
92
|
+
dvt-install-dcnv3 = "deepvisiontools.install_dcnv3:main"
|
|
93
|
+
deepvisiontools = "deepvisiontools.cli:main"
|
|
94
|
+
|
|
95
|
+
[tool.setuptools.dynamic]
|
|
96
|
+
version = { attr = "deepvisiontools.__version__" }
|
|
97
|
+
|
|
98
|
+
[tool.setuptools]
|
|
99
|
+
include-package-data = true
|
|
100
|
+
|
|
101
|
+
[tool.setuptools.package-data]
|
|
102
|
+
deepvisiontools = ["**/*.yaml", "**/*.yml"]
|
|
103
|
+
|
|
104
|
+
# Pytest config.
|
|
105
|
+
[tool.pytest.ini_options]
|
|
106
|
+
testpaths = ["tests"]
|
|
107
|
+
addopts = "-ra"
|
|
108
|
+
markers = [
|
|
109
|
+
"cpu: CPU test variant.",
|
|
110
|
+
"gpu: CUDA test variant, skipped when torch.cuda.is_available() is false.",
|
|
111
|
+
"slow: Slow runtime tests.",
|
|
112
|
+
]
|
|
113
|
+
|
|
114
|
+
# Coverage config.
|
|
115
|
+
[tool.coverage.run]
|
|
116
|
+
source = ["src/deepvisiontools"]
|
|
117
|
+
branch = true
|
|
118
|
+
|
|
119
|
+
[tool.coverage.report]
|
|
120
|
+
skip_empty = true
|
|
121
|
+
show_missing = true
|
|
122
|
+
fail_under = 85
|
|
123
|
+
|
|
124
|
+
# Ruff config: formatting + linting.
|
|
125
|
+
[tool.ruff]
|
|
126
|
+
target-version = "py310"
|
|
127
|
+
line-length = 88
|
|
128
|
+
src = ["src", "tests"]
|
|
129
|
+
exclude = [
|
|
130
|
+
".git",
|
|
131
|
+
".mypy_cache",
|
|
132
|
+
".nox",
|
|
133
|
+
".pytest_cache",
|
|
134
|
+
".ruff_cache",
|
|
135
|
+
".venv",
|
|
136
|
+
"build",
|
|
137
|
+
"dist",
|
|
138
|
+
"public",
|
|
139
|
+
"site",
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
[tool.ruff.lint]
|
|
143
|
+
select = [
|
|
144
|
+
"E", # pycodestyle errors
|
|
145
|
+
"F", # pyflakes
|
|
146
|
+
"I", # import sorting
|
|
147
|
+
"B", # bugbear
|
|
148
|
+
"UP", # pyupgrade
|
|
149
|
+
"C4", # comprehensions
|
|
150
|
+
"SIM", # simplifications
|
|
151
|
+
"RUF", # Ruff-specific rules
|
|
152
|
+
]
|
|
153
|
+
ignore = [
|
|
154
|
+
"E501", # formatter handles line length; avoids noisy docstring failures
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
[tool.ruff.format]
|
|
158
|
+
quote-style = "double"
|
|
159
|
+
indent-style = "space"
|
|
160
|
+
line-ending = "auto"
|
|
161
|
+
|
|
162
|
+
# Mypy config: gradual typing for the package source.
|
|
163
|
+
[tool.mypy]
|
|
164
|
+
python_version = "3.10"
|
|
165
|
+
mypy_path = "src"
|
|
166
|
+
files = ["src/deepvisiontools"]
|
|
167
|
+
show_error_codes = true
|
|
168
|
+
pretty = true
|
|
169
|
+
ignore_missing_imports = true
|
|
170
|
+
check_untyped_defs = true
|
|
171
|
+
warn_unused_ignores = true
|
|
172
|
+
warn_redundant_casts = true
|
|
173
|
+
no_implicit_optional = true
|
|
174
|
+
|
|
175
|
+
# Bandit config: scan source code, not tests.
|
|
176
|
+
[tool.bandit]
|
|
177
|
+
exclude_dirs = ["tests", ".nox", "build", "dist", "public", "site"]
|