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.
Files changed (231) hide show
  1. {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/PKG-INFO +222 -37
  2. deepvisiontools-1.0.0/README.md +198 -0
  3. deepvisiontools-1.0.0/pyproject.toml +177 -0
  4. deepvisiontools-1.0.0/src/deepvisiontools/__init__.py +22 -0
  5. deepvisiontools-1.0.0/src/deepvisiontools/cli.py +127 -0
  6. deepvisiontools-1.0.0/src/deepvisiontools/config/__init__.py +23 -0
  7. deepvisiontools-1.0.0/src/deepvisiontools/config/config.py +474 -0
  8. deepvisiontools-1.0.0/src/deepvisiontools/data/__init__.py +18 -0
  9. deepvisiontools-1.0.0/src/deepvisiontools/data/data.py +1913 -0
  10. deepvisiontools-1.0.0/src/deepvisiontools/data/data_registry.py +23 -0
  11. deepvisiontools-1.0.0/src/deepvisiontools/data/operators.py +188 -0
  12. deepvisiontools-1.0.0/src/deepvisiontools/data/ops_registry.py +1253 -0
  13. deepvisiontools-1.0.0/src/deepvisiontools/datasets/__init__.py +43 -0
  14. deepvisiontools-1.0.0/src/deepvisiontools/datasets/additional_augmentations.py +764 -0
  15. deepvisiontools-1.0.0/src/deepvisiontools/datasets/base.py +971 -0
  16. deepvisiontools-1.0.0/src/deepvisiontools/datasets/coco_dataset.py +528 -0
  17. deepvisiontools-1.0.0/src/deepvisiontools/datasets/semantic_dataset.py +142 -0
  18. deepvisiontools-1.0.0/src/deepvisiontools/download_demo_datasets.py +222 -0
  19. deepvisiontools-1.0.0/src/deepvisiontools/download_tutorials.py +143 -0
  20. deepvisiontools-1.0.0/src/deepvisiontools/evaluation/__init__.py +3 -0
  21. deepvisiontools-1.0.0/src/deepvisiontools/evaluation/evaluator.py +615 -0
  22. deepvisiontools-1.0.0/src/deepvisiontools/evaluation/writers.py +212 -0
  23. deepvisiontools-1.0.0/src/deepvisiontools/inference/__init__.py +3 -0
  24. deepvisiontools-1.0.0/src/deepvisiontools/inference/nms.py +153 -0
  25. deepvisiontools-1.0.0/src/deepvisiontools/inference/predictor.py +1033 -0
  26. deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/__init__.py +12 -0
  27. deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/base.py +117 -0
  28. deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/detection.py +179 -0
  29. deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/instance.py +290 -0
  30. deepvisiontools-1.0.0/src/deepvisiontools/inference/strategies/semantic.py +198 -0
  31. deepvisiontools-1.0.0/src/deepvisiontools/inference/tiling.py +103 -0
  32. deepvisiontools-1.0.0/src/deepvisiontools/install_dcnv3.py +288 -0
  33. deepvisiontools-1.0.0/src/deepvisiontools/metrics/__init__.py +15 -0
  34. deepvisiontools-1.0.0/src/deepvisiontools/metrics/accumulators.py +1160 -0
  35. deepvisiontools-1.0.0/src/deepvisiontools/metrics/engines.py +1018 -0
  36. deepvisiontools-1.0.0/src/deepvisiontools/metrics/factories.py +163 -0
  37. deepvisiontools-1.0.0/src/deepvisiontools/metrics/metrics_core.py +142 -0
  38. deepvisiontools-1.0.0/src/deepvisiontools/metrics/per_sample_engine.py +356 -0
  39. deepvisiontools-1.0.0/src/deepvisiontools/metrics/suites.py +338 -0
  40. deepvisiontools-1.0.0/src/deepvisiontools/models/__init__.py +30 -0
  41. deepvisiontools-1.0.0/src/deepvisiontools/models/base/basemodel.py +1007 -0
  42. deepvisiontools-1.0.0/src/deepvisiontools/models/base/checkpoints.py +719 -0
  43. deepvisiontools-1.0.0/src/deepvisiontools/models/base/protocols.py +73 -0
  44. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/__init__.py +19 -0
  45. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/detector.py +459 -0
  46. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/detector_seg.py +469 -0
  47. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/__init__.py +2 -0
  48. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/backbones/backbones.py +619 -0
  49. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/__init__.py +0 -0
  50. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/commonblocks.py +650 -0
  51. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/headregistry.py +83 -0
  52. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/neckregistry.py +58 -0
  53. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/outputs.py +950 -0
  54. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/specs.py +39 -0
  55. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/commons/utils.py +59 -0
  56. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/__init__.py +0 -0
  57. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/config.py +553 -0
  58. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/__init__.py +0 -0
  59. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/__init__.py +0 -0
  60. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_maskrcnn.yaml +106 -0
  61. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_rcnn.yaml +73 -0
  62. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_vfnet_stardcn.yaml +22 -0
  63. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_maskrcnn.yaml +107 -0
  64. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_rcnn.yaml +74 -0
  65. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_vfnet_stardcn.yaml +22 -0
  66. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_maskrcnn.yaml +107 -0
  67. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_rcnn.yaml +75 -0
  68. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_vfnet_stardcn.yaml +22 -0
  69. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_maskrcnn.yaml +108 -0
  70. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_rcnn.yaml +73 -0
  71. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_vfnet_stardcn.yaml +22 -0
  72. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_maskrcnn.yaml +107 -0
  73. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_rcnn.yaml +73 -0
  74. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_vfnet_stardcn.yaml +22 -0
  75. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_maskrcnn.yaml +108 -0
  76. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_rcnn.yaml +73 -0
  77. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_vfnet_stardcn.yaml +22 -0
  78. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
  79. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_rcnn.yaml +67 -0
  80. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_vfnet_stardcn.yaml +19 -0
  81. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
  82. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_rcnn.yaml +67 -0
  83. 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
  84. 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
  85. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_maskrcnn.yaml +140 -0
  86. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_rcnn.yaml +108 -0
  87. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_vfnet.yaml +76 -0
  88. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_cascade_rcnn.yaml +116 -0
  89. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_vfnet.yaml +85 -0
  90. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/config/yamlutils.py +317 -0
  91. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/__init__.py +0 -0
  92. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/detectors.py +518 -0
  93. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/facades/tabdets.py +561 -0
  94. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/__init__.py +0 -0
  95. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/headblocks.py +1086 -0
  96. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/heads/heads.py +2615 -0
  97. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/__init__.py +0 -0
  98. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/losses.py +1791 -0
  99. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/losses/lossutils.py +422 -0
  100. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/__init__.py +0 -0
  101. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/neckblocks.py +237 -0
  102. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/necks/necks.py +799 -0
  103. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/tiling/__init__.py +0 -0
  104. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/tiling/tiling.py +238 -0
  105. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/tab_seg.py +436 -0
  106. deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/tabdet.py +444 -0
  107. deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/__init__.py +0 -0
  108. deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/device_amp_helpers.py +78 -0
  109. deepvisiontools-1.0.0/src/deepvisiontools/models/helpers/preprocess_helpers.py +31 -0
  110. deepvisiontools-1.0.0/src/deepvisiontools/models/smp/__init__.py +10 -0
  111. deepvisiontools-1.0.0/src/deepvisiontools/models/smp/smp.py +601 -0
  112. deepvisiontools-1.0.0/src/deepvisiontools/models/yolo/__init__.py +19 -0
  113. deepvisiontools-1.0.0/src/deepvisiontools/models/yolo/yolo.py +961 -0
  114. deepvisiontools-1.0.0/src/deepvisiontools/models/yoloseg/__init__.py +19 -0
  115. deepvisiontools-1.0.0/src/deepvisiontools/models/yoloseg/yoloseg.py +1165 -0
  116. deepvisiontools-1.0.0/src/deepvisiontools/train/__init__.py +56 -0
  117. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/__init__.py +0 -0
  118. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/configregistry.py +371 -0
  119. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/__init__.py +0 -0
  120. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_maskrcnn_default_config.yaml +75 -0
  121. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_rcnn_default_config.yaml +75 -0
  122. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_vfnet_stardcn_default_config.yaml +75 -0
  123. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_maskrcnn_default_config.yaml +75 -0
  124. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_rcnn_default_config.yaml +74 -0
  125. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_vfnet_stardcn_default_config.yaml +75 -0
  126. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_maskrcnn_default_config.yaml +75 -0
  127. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_rcnn_default_config.yaml +75 -0
  128. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_vfnet_stardcn_default_config.yaml +75 -0
  129. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_maskrcnn_default_config.yaml +75 -0
  130. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_rcnn_default_config.yaml +75 -0
  131. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_vfnet_stardcn_default_config.yaml +75 -0
  132. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_maskrcnn_default_config.yaml +75 -0
  133. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_rcnn_default_config.yaml +75 -0
  134. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_vfnet_stardcn_default_config.yaml +75 -0
  135. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_maskrcnn_default_config.yaml +75 -0
  136. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_rcnn_default_config.yaml +75 -0
  137. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_vfnet_stardcn_default_config.yaml +75 -0
  138. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
  139. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
  140. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_vfnet_stardcn_default_config.yaml +75 -0
  141. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_maskrcnn_default_config.yaml +75 -0
  142. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_rcnn_default_config.yaml +75 -0
  143. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
  144. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
  145. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/smp_unet_resnet50_default_config.yaml +79 -0
  146. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11l-seg_default_config.yaml +77 -0
  147. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11l_default_config.yaml +77 -0
  148. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11m-seg_default_config.yaml +77 -0
  149. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11m_default_config.yaml +77 -0
  150. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11n-seg_default_config.yaml +77 -0
  151. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11n_default_config.yaml +77 -0
  152. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11x-seg_default_config.yaml +77 -0
  153. deepvisiontools-1.0.0/src/deepvisiontools/train/availableconfigs/yolo11x_default_config.yaml +77 -0
  154. deepvisiontools-1.0.0/src/deepvisiontools/train/ema.py +266 -0
  155. deepvisiontools-1.0.0/src/deepvisiontools/train/hooks.py +1501 -0
  156. deepvisiontools-1.0.0/src/deepvisiontools/train/llrd.py +1035 -0
  157. deepvisiontools-1.0.0/src/deepvisiontools/train/loggers.py +668 -0
  158. deepvisiontools-1.0.0/src/deepvisiontools/train/optuna_wrapper.py +3013 -0
  159. deepvisiontools-1.0.0/src/deepvisiontools/train/trainconfig.py +2172 -0
  160. deepvisiontools-1.0.0/src/deepvisiontools/train/trainer.py +2677 -0
  161. deepvisiontools-1.0.0/src/deepvisiontools/utils/__init__.py +11 -0
  162. deepvisiontools-1.0.0/src/deepvisiontools/utils/image_and_mask.py +165 -0
  163. deepvisiontools-1.0.0/src/deepvisiontools/utils/logging.py +117 -0
  164. {deepvisiontools-0.2.0/src/deepvisiontools/preprocessing → deepvisiontools-1.0.0/src/deepvisiontools/utils}/preprocessing.py +20 -9
  165. {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/src/deepvisiontools.egg-info/PKG-INFO +222 -37
  166. deepvisiontools-1.0.0/src/deepvisiontools.egg-info/SOURCES.txt +172 -0
  167. deepvisiontools-1.0.0/src/deepvisiontools.egg-info/entry_points.txt +3 -0
  168. deepvisiontools-1.0.0/src/deepvisiontools.egg-info/requires.txt +36 -0
  169. deepvisiontools-0.2.0/README.md +0 -40
  170. deepvisiontools-0.2.0/pyproject.toml +0 -50
  171. deepvisiontools-0.2.0/setup.py +0 -4
  172. deepvisiontools-0.2.0/src/deepvisiontools/__init__.py +0 -18
  173. deepvisiontools-0.2.0/src/deepvisiontools/config/__init__.py +0 -3
  174. deepvisiontools-0.2.0/src/deepvisiontools/config/config.py +0 -179
  175. deepvisiontools-0.2.0/src/deepvisiontools/config/errors.py +0 -12
  176. deepvisiontools-0.2.0/src/deepvisiontools/data/__init__.py +0 -24
  177. deepvisiontools-0.2.0/src/deepvisiontools/data/additional_augmentations.py +0 -201
  178. deepvisiontools-0.2.0/src/deepvisiontools/data/augmentation_class.py +0 -37
  179. deepvisiontools-0.2.0/src/deepvisiontools/data/batch_augmentations.py +0 -211
  180. deepvisiontools-0.2.0/src/deepvisiontools/data/data_reader/__init__.py +0 -3
  181. deepvisiontools-0.2.0/src/deepvisiontools/data/data_reader/readers.py +0 -490
  182. deepvisiontools-0.2.0/src/deepvisiontools/data/dataset.py +0 -359
  183. deepvisiontools-0.2.0/src/deepvisiontools/data/errors.py +0 -23
  184. deepvisiontools-0.2.0/src/deepvisiontools/formats/__init__.py +0 -46
  185. deepvisiontools-0.2.0/src/deepvisiontools/formats/base_data.py +0 -822
  186. deepvisiontools-0.2.0/src/deepvisiontools/formats/base_formats.py +0 -326
  187. deepvisiontools-0.2.0/src/deepvisiontools/formats/errors.py +0 -167
  188. deepvisiontools-0.2.0/src/deepvisiontools/formats/formats.py +0 -282
  189. deepvisiontools-0.2.0/src/deepvisiontools/formats/utils.py +0 -174
  190. deepvisiontools-0.2.0/src/deepvisiontools/inference/__init__.py +0 -5
  191. deepvisiontools-0.2.0/src/deepvisiontools/inference/evaluator.py +0 -256
  192. deepvisiontools-0.2.0/src/deepvisiontools/inference/patchifier.py +0 -343
  193. deepvisiontools-0.2.0/src/deepvisiontools/inference/predictor.py +0 -245
  194. deepvisiontools-0.2.0/src/deepvisiontools/metrics/__init__.py +0 -50
  195. deepvisiontools-0.2.0/src/deepvisiontools/metrics/available_metrics.py +0 -215
  196. deepvisiontools-0.2.0/src/deepvisiontools/metrics/base_metric.py +0 -683
  197. deepvisiontools-0.2.0/src/deepvisiontools/metrics/func.py +0 -36
  198. deepvisiontools-0.2.0/src/deepvisiontools/metrics/matcher.py +0 -99
  199. deepvisiontools-0.2.0/src/deepvisiontools/metrics/utils.py +0 -39
  200. deepvisiontools-0.2.0/src/deepvisiontools/models/__init__.py +0 -16
  201. deepvisiontools-0.2.0/src/deepvisiontools/models/basemodel.py +0 -100
  202. deepvisiontools-0.2.0/src/deepvisiontools/models/mask2former/__init__.py +0 -3
  203. deepvisiontools-0.2.0/src/deepvisiontools/models/mask2former/mask2former.py +0 -285
  204. deepvisiontools-0.2.0/src/deepvisiontools/models/smp/errors.py +0 -4
  205. deepvisiontools-0.2.0/src/deepvisiontools/models/smp/smp.py +0 -149
  206. deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/__init__.py +0 -4
  207. deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/errors.py +0 -5
  208. deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/timmyolo.py +0 -392
  209. deepvisiontools-0.2.0/src/deepvisiontools/models/timmyolo/utils.py +0 -230
  210. deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/__init__.py +0 -15
  211. deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/errors.py +0 -25
  212. deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/utils.py +0 -92
  213. deepvisiontools-0.2.0/src/deepvisiontools/models/yolo/yolo.py +0 -314
  214. deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/__init__.py +0 -4
  215. deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/errors.py +0 -14
  216. deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/utils.py +0 -135
  217. deepvisiontools-0.2.0/src/deepvisiontools/models/yoloseg/yoloseg.py +0 -391
  218. deepvisiontools-0.2.0/src/deepvisiontools/preprocessing/__init__.py +0 -19
  219. deepvisiontools-0.2.0/src/deepvisiontools/preprocessing/image.py +0 -79
  220. deepvisiontools-0.2.0/src/deepvisiontools/train/__init__.py +0 -3
  221. deepvisiontools-0.2.0/src/deepvisiontools/train/trainer.py +0 -355
  222. deepvisiontools-0.2.0/src/deepvisiontools/utils/__init__.py +0 -3
  223. deepvisiontools-0.2.0/src/deepvisiontools/utils/visualization.py +0 -318
  224. deepvisiontools-0.2.0/src/deepvisiontools.egg-info/SOURCES.txt +0 -64
  225. deepvisiontools-0.2.0/src/deepvisiontools.egg-info/requires.txt +0 -10
  226. {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/LICENSE.txt +0 -0
  227. {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/setup.cfg +0 -0
  228. {deepvisiontools-0.2.0/src/deepvisiontools/models/smp → deepvisiontools-1.0.0/src/deepvisiontools/models/base}/__init__.py +0 -0
  229. /deepvisiontools-0.2.0/src/deepvisiontools/utils/errors.py → /deepvisiontools-1.0.0/src/deepvisiontools/models/detectors/models/backbones/__init__.py +0 -0
  230. {deepvisiontools-0.2.0 → deepvisiontools-1.0.0}/src/deepvisiontools.egg-info/dependency_links.txt +0 -0
  231. {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.2.0
4
- Summary: Overlay of PyTorch to generalize trainning and inference processes for detection, instance segmentation and semantic segmentation tasks.
5
- Author-email: Lucas Bernigaud Samatan <lucas.bernigaud-samatan@inrae.fr>, Jordan Bernigaud Samatan <jordan.bernigaud-samatan@inrae.fr>, Paul Faucher <paul.faucher@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://forgemia.inra.fr/ue-apc/librairies/python/deepvisiontools_v1
670
- Project-URL: Issues, https://forgemia.inra.fr/ue-apc/librairies/python/deepvisiontools_v1/-/issues
671
- Project-URL: Documentation, https://deepvisiontools.readthedocs.io/en/latest/
672
- Project-URL: Repository, https://forgemia.inra.fr/ue-apc/librairies/python/deepvisiontools_v1
673
- Classifier: Development Status :: 4 - Beta
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
- Requires-Python: <=3.12.12,>=3.11.9
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<=2.6.0,>=2.4.0
680
- Requires-Dist: torchvision<=0.21.0,>=0.19.0
681
- Requires-Dist: pycocotools==2.0.8
682
- Requires-Dist: torchmetrics<=1.7.0,>=1.4.0
683
- Requires-Dist: tensorboard<=2.19.0,>=2.18.0
684
- Requires-Dist: ultralytics<=8.3.95,>=8.3.28
685
- Requires-Dist: transformers<=4.50.0,>=4.44.2
686
- Requires-Dist: colorcet==3.1.0
687
- Requires-Dist: segmentation-models-pytorch<=0.5.0,>0.4.0
688
- Requires-Dist: openpyxl==3.1.5
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="https://github.com///raw/main/docs/source/logo.png" height="150">
719
+ <img align="center" src="supplementary/logo-dvt.png" height="100">
694
720
  </p>
695
- -->
696
721
 
697
- <h1 align="center">
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
- Torch overlay for trainning and inference processes for object detection & instance segmentation tasks.
726
+ <p align="center">
727
+ <img align="center" src="supplementary/coco_visu.png" height="130"> &nbsp; &nbsp; &nbsp; <img align="center" src="supplementary/veg_visu.png" height="130"> &nbsp; &nbsp; &nbsp; <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
- ## 💪 Context
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
- deepvisiontools is developped by INRAE (french National Research Institute for Agriculture, Food and the Environment) and in [PHENOME-EMPHASIS project](https://www.phenome-emphasis.fr/).
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
- deepvisiontools provides model wrappers that allow you to use differents models with all machinery available. It is the responsability of the user to cite properly the actual model developpers.
711
- In particular, if using one of these models : Yolo, SMP please cite the actual models developpers (which are not deepvisiontools). For instance for Yolo, please cite ultralytics (https://www.ultralytics.com/) or for SMP cite https://github.com/qubvel-org/segmentation_models.pytorch
712
- Similar stands for other models.
713
- TimmYolo model is a new model that combines timm encoders with a Yolo detection head. The strategy is based on patchification for the backbone (to avoid loosing resolution in resizing) then merge the features before running a Yolo detection heads. If you use this wrapper please cite both timm library, ultralytics library as well as deepvisiontools as model developper.
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
- ## Documentation
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
- All documentation about deepvisiontools, including tutorials, can be found at : https://deepvisiontools.readthedocs.io/en/latest/
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
- ```shell
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
- If you wish to use TimmYolo model, you may encounter an error saying that feature_only is not available for a given encoder name. Please upgrade your timm version (1.0.15 should have most of them). You may need to reinstall deepvisiontools as you could create conflicts with segmentation-models-pytorch.
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"> &nbsp; &nbsp; &nbsp; <img align="center" src="supplementary/veg_visu.png" height="130"> &nbsp; &nbsp; &nbsp; <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"]