deepvisiontools 0.2.0__tar.gz → 1.0.1__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.1}/PKG-INFO +226 -37
  2. deepvisiontools-1.0.1/README.md +202 -0
  3. deepvisiontools-1.0.1/pyproject.toml +177 -0
  4. deepvisiontools-1.0.1/src/deepvisiontools/__init__.py +22 -0
  5. deepvisiontools-1.0.1/src/deepvisiontools/cli.py +127 -0
  6. deepvisiontools-1.0.1/src/deepvisiontools/config/__init__.py +23 -0
  7. deepvisiontools-1.0.1/src/deepvisiontools/config/config.py +474 -0
  8. deepvisiontools-1.0.1/src/deepvisiontools/data/__init__.py +18 -0
  9. deepvisiontools-1.0.1/src/deepvisiontools/data/data.py +1913 -0
  10. deepvisiontools-1.0.1/src/deepvisiontools/data/data_registry.py +23 -0
  11. deepvisiontools-1.0.1/src/deepvisiontools/data/operators.py +188 -0
  12. deepvisiontools-1.0.1/src/deepvisiontools/data/ops_registry.py +1253 -0
  13. deepvisiontools-1.0.1/src/deepvisiontools/datasets/__init__.py +43 -0
  14. deepvisiontools-1.0.1/src/deepvisiontools/datasets/additional_augmentations.py +764 -0
  15. deepvisiontools-1.0.1/src/deepvisiontools/datasets/base.py +971 -0
  16. deepvisiontools-1.0.1/src/deepvisiontools/datasets/coco_dataset.py +528 -0
  17. deepvisiontools-1.0.1/src/deepvisiontools/datasets/semantic_dataset.py +142 -0
  18. deepvisiontools-1.0.1/src/deepvisiontools/download_demo_datasets.py +222 -0
  19. deepvisiontools-1.0.1/src/deepvisiontools/download_tutorials.py +143 -0
  20. deepvisiontools-1.0.1/src/deepvisiontools/evaluation/__init__.py +3 -0
  21. deepvisiontools-1.0.1/src/deepvisiontools/evaluation/evaluator.py +615 -0
  22. deepvisiontools-1.0.1/src/deepvisiontools/evaluation/writers.py +212 -0
  23. deepvisiontools-1.0.1/src/deepvisiontools/inference/__init__.py +3 -0
  24. deepvisiontools-1.0.1/src/deepvisiontools/inference/nms.py +153 -0
  25. deepvisiontools-1.0.1/src/deepvisiontools/inference/predictor.py +1033 -0
  26. deepvisiontools-1.0.1/src/deepvisiontools/inference/strategies/__init__.py +12 -0
  27. deepvisiontools-1.0.1/src/deepvisiontools/inference/strategies/base.py +117 -0
  28. deepvisiontools-1.0.1/src/deepvisiontools/inference/strategies/detection.py +179 -0
  29. deepvisiontools-1.0.1/src/deepvisiontools/inference/strategies/instance.py +290 -0
  30. deepvisiontools-1.0.1/src/deepvisiontools/inference/strategies/semantic.py +198 -0
  31. deepvisiontools-1.0.1/src/deepvisiontools/inference/tiling.py +103 -0
  32. deepvisiontools-1.0.1/src/deepvisiontools/install_dcnv3.py +288 -0
  33. deepvisiontools-1.0.1/src/deepvisiontools/metrics/__init__.py +15 -0
  34. deepvisiontools-1.0.1/src/deepvisiontools/metrics/accumulators.py +1160 -0
  35. deepvisiontools-1.0.1/src/deepvisiontools/metrics/engines.py +1018 -0
  36. deepvisiontools-1.0.1/src/deepvisiontools/metrics/factories.py +163 -0
  37. deepvisiontools-1.0.1/src/deepvisiontools/metrics/metrics_core.py +142 -0
  38. deepvisiontools-1.0.1/src/deepvisiontools/metrics/per_sample_engine.py +356 -0
  39. deepvisiontools-1.0.1/src/deepvisiontools/metrics/suites.py +338 -0
  40. deepvisiontools-1.0.1/src/deepvisiontools/models/__init__.py +30 -0
  41. deepvisiontools-1.0.1/src/deepvisiontools/models/base/basemodel.py +1007 -0
  42. deepvisiontools-1.0.1/src/deepvisiontools/models/base/checkpoints.py +719 -0
  43. deepvisiontools-1.0.1/src/deepvisiontools/models/base/protocols.py +73 -0
  44. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/__init__.py +19 -0
  45. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/detector.py +459 -0
  46. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/detector_seg.py +469 -0
  47. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/__init__.py +2 -0
  48. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/backbones/backbones.py +619 -0
  49. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/__init__.py +0 -0
  50. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/commonblocks.py +650 -0
  51. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/headregistry.py +83 -0
  52. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/neckregistry.py +58 -0
  53. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/outputs.py +950 -0
  54. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/specs.py +39 -0
  55. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/commons/utils.py +59 -0
  56. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/__init__.py +0 -0
  57. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/config.py +553 -0
  58. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/__init__.py +0 -0
  59. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/__init__.py +0 -0
  60. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_maskrcnn.yaml +106 -0
  61. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_cascade_rcnn.yaml +73 -0
  62. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-base_vfnet_stardcn.yaml +22 -0
  63. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_maskrcnn.yaml +107 -0
  64. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_cascade_rcnn.yaml +74 -0
  65. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-huge_vfnet_stardcn.yaml +22 -0
  66. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_maskrcnn.yaml +107 -0
  67. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_cascade_rcnn.yaml +75 -0
  68. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_convnextv2-large_vfnet_stardcn.yaml +22 -0
  69. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_maskrcnn.yaml +108 -0
  70. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_cascade_rcnn.yaml +73 -0
  71. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-b-1k-224_vfnet_stardcn.yaml +22 -0
  72. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_maskrcnn.yaml +107 -0
  73. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_cascade_rcnn.yaml +73 -0
  74. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-h-22kto1k-640_vfnet_stardcn.yaml +22 -0
  75. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_maskrcnn.yaml +108 -0
  76. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_cascade_rcnn.yaml +73 -0
  77. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_detector_internimage-xl-22kto1k-384_vfnet_stardcn.yaml +22 -0
  78. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
  79. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_cascade_rcnn.yaml +67 -0
  80. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-base-patch16-dinov3_vfnet_stardcn.yaml +19 -0
  81. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_maskrcnn.yaml +100 -0
  82. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/cocopretrained/default_tabdet_vit-giant-patch16-dinov3_cascade_rcnn.yaml +67 -0
  83. deepvisiontools-1.0.1/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.1/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.1/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_maskrcnn.yaml +140 -0
  86. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_cascade_rcnn.yaml +108 -0
  87. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/default_detector_vfnet.yaml +76 -0
  88. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_cascade_rcnn.yaml +116 -0
  89. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/model_configs/default_tabdet_vfnet.yaml +85 -0
  90. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/config/yamlutils.py +317 -0
  91. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/facades/__init__.py +0 -0
  92. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/facades/detectors.py +518 -0
  93. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/facades/tabdets.py +561 -0
  94. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/heads/__init__.py +0 -0
  95. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/heads/headblocks.py +1086 -0
  96. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/heads/heads.py +2615 -0
  97. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/losses/__init__.py +0 -0
  98. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/losses/losses.py +1791 -0
  99. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/losses/lossutils.py +422 -0
  100. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/necks/__init__.py +0 -0
  101. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/necks/neckblocks.py +237 -0
  102. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/necks/necks.py +799 -0
  103. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/tiling/__init__.py +0 -0
  104. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/tiling/tiling.py +238 -0
  105. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/tab_seg.py +436 -0
  106. deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/tabdet.py +444 -0
  107. deepvisiontools-1.0.1/src/deepvisiontools/models/helpers/__init__.py +0 -0
  108. deepvisiontools-1.0.1/src/deepvisiontools/models/helpers/device_amp_helpers.py +78 -0
  109. deepvisiontools-1.0.1/src/deepvisiontools/models/helpers/preprocess_helpers.py +31 -0
  110. deepvisiontools-1.0.1/src/deepvisiontools/models/smp/__init__.py +10 -0
  111. deepvisiontools-1.0.1/src/deepvisiontools/models/smp/smp.py +601 -0
  112. deepvisiontools-1.0.1/src/deepvisiontools/models/yolo/__init__.py +19 -0
  113. deepvisiontools-1.0.1/src/deepvisiontools/models/yolo/yolo.py +1057 -0
  114. deepvisiontools-1.0.1/src/deepvisiontools/models/yoloseg/__init__.py +19 -0
  115. deepvisiontools-1.0.1/src/deepvisiontools/models/yoloseg/yoloseg.py +1176 -0
  116. deepvisiontools-1.0.1/src/deepvisiontools/train/__init__.py +56 -0
  117. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/__init__.py +0 -0
  118. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/configregistry.py +371 -0
  119. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/__init__.py +0 -0
  120. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_maskrcnn_default_config.yaml +75 -0
  121. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_cascade_rcnn_default_config.yaml +75 -0
  122. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-base_vfnet_stardcn_default_config.yaml +75 -0
  123. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_maskrcnn_default_config.yaml +75 -0
  124. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_cascade_rcnn_default_config.yaml +74 -0
  125. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-huge_vfnet_stardcn_default_config.yaml +75 -0
  126. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_maskrcnn_default_config.yaml +75 -0
  127. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_cascade_rcnn_default_config.yaml +75 -0
  128. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_convnextv2-large_vfnet_stardcn_default_config.yaml +75 -0
  129. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_maskrcnn_default_config.yaml +75 -0
  130. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_cascade_rcnn_default_config.yaml +75 -0
  131. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-b-1k-224_vfnet_stardcn_default_config.yaml +75 -0
  132. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_maskrcnn_default_config.yaml +75 -0
  133. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_cascade_rcnn_default_config.yaml +75 -0
  134. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-h-22kto1k-640_vfnet_stardcn_default_config.yaml +75 -0
  135. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_maskrcnn_default_config.yaml +75 -0
  136. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_cascade_rcnn_default_config.yaml +75 -0
  137. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/detector_internimage-xl-22kto1k-384_vfnet_stardcn_default_config.yaml +75 -0
  138. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
  139. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
  140. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-base-patch16-dinov3_vfnet_stardcn_default_config.yaml +75 -0
  141. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_maskrcnn_default_config.yaml +75 -0
  142. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-giant-patch16-gap-224_cascade_rcnn_default_config.yaml +75 -0
  143. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_maskrcnn_default_config.yaml +75 -0
  144. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/detectors_cocopretrained/tabdet_vit-huge-plus-patch16-dinov3_cascade_rcnn_default_config.yaml +75 -0
  145. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/smp_unet_resnet50_default_config.yaml +79 -0
  146. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11l-seg_default_config.yaml +77 -0
  147. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11l_default_config.yaml +77 -0
  148. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11m-seg_default_config.yaml +77 -0
  149. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11m_default_config.yaml +77 -0
  150. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11n-seg_default_config.yaml +77 -0
  151. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11n_default_config.yaml +77 -0
  152. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11x-seg_default_config.yaml +77 -0
  153. deepvisiontools-1.0.1/src/deepvisiontools/train/availableconfigs/yolo11x_default_config.yaml +77 -0
  154. deepvisiontools-1.0.1/src/deepvisiontools/train/ema.py +266 -0
  155. deepvisiontools-1.0.1/src/deepvisiontools/train/hooks.py +1501 -0
  156. deepvisiontools-1.0.1/src/deepvisiontools/train/llrd.py +1035 -0
  157. deepvisiontools-1.0.1/src/deepvisiontools/train/loggers.py +668 -0
  158. deepvisiontools-1.0.1/src/deepvisiontools/train/optuna_wrapper.py +3013 -0
  159. deepvisiontools-1.0.1/src/deepvisiontools/train/trainconfig.py +2172 -0
  160. deepvisiontools-1.0.1/src/deepvisiontools/train/trainer.py +2677 -0
  161. deepvisiontools-1.0.1/src/deepvisiontools/utils/__init__.py +11 -0
  162. deepvisiontools-1.0.1/src/deepvisiontools/utils/image_and_mask.py +165 -0
  163. deepvisiontools-1.0.1/src/deepvisiontools/utils/logging.py +117 -0
  164. {deepvisiontools-0.2.0/src/deepvisiontools/preprocessing → deepvisiontools-1.0.1/src/deepvisiontools/utils}/preprocessing.py +20 -9
  165. {deepvisiontools-0.2.0 → deepvisiontools-1.0.1}/src/deepvisiontools.egg-info/PKG-INFO +226 -37
  166. deepvisiontools-1.0.1/src/deepvisiontools.egg-info/SOURCES.txt +172 -0
  167. deepvisiontools-1.0.1/src/deepvisiontools.egg-info/entry_points.txt +3 -0
  168. deepvisiontools-1.0.1/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.1}/LICENSE.txt +0 -0
  227. {deepvisiontools-0.2.0 → deepvisiontools-1.0.1}/setup.cfg +0 -0
  228. {deepvisiontools-0.2.0/src/deepvisiontools/models/smp → deepvisiontools-1.0.1/src/deepvisiontools/models/base}/__init__.py +0 -0
  229. /deepvisiontools-0.2.0/src/deepvisiontools/utils/errors.py → /deepvisiontools-1.0.1/src/deepvisiontools/models/detectors/models/backbones/__init__.py +0 -0
  230. {deepvisiontools-0.2.0 → deepvisiontools-1.0.1}/src/deepvisiontools.egg-info/dependency_links.txt +0 -0
  231. {deepvisiontools-0.2.0 → deepvisiontools-1.0.1}/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.1
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,254 @@ 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<8.5.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
+ ### patchs
735
+
736
+ - *1.0.1 : fixed inconsistency for yolo wrappers due to modified behaviour in ultralytics between 8.3 and 8.4 versions. Fixed and compatible with both.*
737
+
738
+ ## Scope
739
+
740
+ deepvisiontools is suitable for supervised learning computer vision tasks. Tasks currently available are:
741
+
742
+ - detection (bounding boxes)
743
+ - instance segmentation (object instance masks)
744
+ - semantic segmentation (semantic masks)
745
+
746
+ Future releases will include:
703
747
 
704
- ## 💪 Context
748
+ - classification
749
+ - regression
750
+ - keypoints/pose detection
751
+ - crowd detection (point detection)
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
+ deepvisiontools provides integrated pipelines that include dataset handlers, model wrappers, training and hyper-parameter fine-tuning helpers, metrics, inference and evaluation tools.
754
+
755
+ 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.
756
+
757
+
758
+ ## Context
759
+
760
+ 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
761
 
708
762
  ## Citations
709
763
 
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.
764
+ To cite deepvisiontools when used, please cite the official repository: https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
765
+
766
+ **Important**: deepvisiontools provides model wrappers and does not reimplement all models. It is the responsibility of the user to also cite the model developers.
714
767
 
715
- ## Documentation
768
+ If you are using one of these models, please cite the corresponding library as well:
716
769
 
717
- All documentation about deepvisiontools, including tutorials, can be found at : https://deepvisiontools.readthedocs.io/en/latest/
770
+ - `"yolo"`: cite Ultralytics (https://www.ultralytics.com/)
771
+ - `"smp"`: cite segmentation-models-pytorch (https://github.com/qubvel-org/segmentation_models.pytorch)
772
+
773
+ 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.
774
+
775
+ 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
776
 
719
777
  ## 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
778
 
722
- ```shell
779
+ 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**.
780
+
781
+ deepvisiontools is available on PyPI, so you can simply run in a Python environment:
782
+
783
+ ```bash
723
784
  pip install deepvisiontools
724
785
  ```
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.
786
+
787
+ To install deepvisiontools in development mode, please clone the repository and run:
788
+
789
+ ```bash
790
+ pip install -e deepvisiontools/ # local cloned repo
791
+ ```
792
+
793
+ Finally, to install deepvisiontools with developer extras, move inside the cloned repo and run:
794
+
795
+ ```bash
796
+ pip install -e ".[dev]"
797
+ ```
798
+
799
+ This will include extras like documentation, pytest, nox, etc.
800
+
801
+ ## Documentation and tutorials
802
+
803
+ Official documentation for deepvisiontools can be found here: https://deepvisiontools-1233bd.pages-forge.inrae.fr/
804
+
805
+ To get started with deepvisiontools, after installation you can run:
806
+
807
+ ```bash
808
+ deepvisiontools download-tutorials
809
+ ```
810
+
811
+ You will also need to download the demo datasets:
812
+
813
+ ```bash
814
+ deepvisiontools download-demo-datasets
815
+ ```
816
+
817
+ 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.
818
+
819
+ We then recommend moving to **advanced_usage** to get a broader view of what you can configure in deepvisiontools and all available helpers.
820
+
821
+ Finally, the **hyper_parametrs_optimization** tutorial will explain the usage of Optuna wrappers available in deepvisiontools to perform extensive parameter space searches.
822
+
823
+ ## Monitoring via MLflow
824
+
825
+ deepvisiontools includes MLflow for monitoring, checkpointing and artifacts during training.
826
+
827
+ If you use deepvisiontools as intended, at some point you will end up with an `mlruns` folder.
828
+
829
+ You can use the following command to start MLflow and then open the local page in your browser to display the MLflow UI:
830
+
831
+ ```bash
832
+ mlflow server --backend-store-uri sqlite:////$(pwd)/mlruns/mlflow.db --default-artifact-root file:$(pwd)/mlruns --host 127.0.0.1 --port 5000
833
+ ```
834
+
835
+ An alternative way for Jupyter notebooks is presented in the tutorial.
836
+
726
837
  ## License
727
838
 
728
839
  GNU Affero General Public License v3 or later (AGPLv3+) (AGPL-3.0).
729
840
 
841
+ ## Contributor specifics
842
+
843
+ 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.
844
+
845
+ ### Organization and CI
846
+
847
+ 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*.
848
+
849
+ The deepvisiontools repository has a CI pipeline that includes:
850
+
851
+ - linting / formatting checks with ruff
852
+ - security checks (high-risk issues are blocking only on protected release paths)
853
+ - package build
854
+ - tests (Python 3.10, 3.11, 3.12, 3.13, 3.14)
855
+ - documentation build
856
+
857
+ ### Unit and functional tests
858
+
859
+ For contributors, you can run the local series of unit/functional tests. First, install the additional test-related dependencies.
860
+
861
+ We strongly recommend that you run local tests before creating a merge request.
862
+
863
+ #### Run with coverage
864
+
865
+ ```bash
866
+ coverage run -m pytest # run tests under coverage
867
+ coverage report -m # text coverage summary
868
+ coverage html # HTML coverage report in htmlcov/index.html
869
+ ```
870
+
871
+ #### Running subsets
872
+
873
+ ```bash
874
+ pytest tests/unit -q # only unit tests
875
+ pytest tests/functional -q # only functional tests
876
+ ```
877
+
878
+ #### Run with nox
879
+
880
+ ```bash
881
+ 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
882
+ ```
883
+
884
+ For example:
885
+
886
+ ```bash
887
+ nox -s tests-3.12
888
+ ```
889
+
890
+ ### Check other CI stages locally
891
+
892
+ Use nox, which is installed if `".[dev]"` was used during installation:
893
+
894
+ ```bash
895
+ nox -s ruff # formatting / linting
896
+ nox -s typecheck # type checking with mypy
897
+ nox -s security # security checks with bandit
898
+ nox -s tests-3.xx # CPU-only, non-slow tests on a specific Python version
899
+ nox -s docs # build the docs
900
+ ```
901
+ **note that the nox docs session produces a _nox_doc/ folder, so you can inspect the doc locally**
902
+
903
+ ### Linting and formatting
904
+
905
+ We suggest that you use ruff during development to maintain code compatibility with the tests. You can use ruff to check linting and formatting:
906
+
907
+ ```bash
908
+ ruff check src tests # check linting on src and tests folders
909
+ ruff check --fix src tests # apply safe lint fixes
910
+ ruff format --check src tests # check formatting
911
+ ruff format src tests # apply safe formatting on src and tests folders
912
+ ```
913
+
914
+ Even better is to use ruff in your IDE.
915
+
916
+ ### release on PyPi
917
+ *Only maintainer can create release with propper tags*
730
918
 
919
+ 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,202 @@
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
+ ### patchs
18
+
19
+ - *1.0.1 : fixed inconsistency for yolo wrappers due to modified behaviour in ultralytics between 8.3 and 8.4 versions. Fixed and compatible with both.*
20
+
21
+ ## Scope
22
+
23
+ deepvisiontools is suitable for supervised learning computer vision tasks. Tasks currently available are:
24
+
25
+ - detection (bounding boxes)
26
+ - instance segmentation (object instance masks)
27
+ - semantic segmentation (semantic masks)
28
+
29
+ Future releases will include:
30
+
31
+ - classification
32
+ - regression
33
+ - keypoints/pose detection
34
+ - crowd detection (point detection)
35
+
36
+ deepvisiontools provides integrated pipelines that include dataset handlers, model wrappers, training and hyper-parameter fine-tuning helpers, metrics, inference and evaluation tools.
37
+
38
+ 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.
39
+
40
+
41
+ ## Context
42
+
43
+ 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.
44
+
45
+ ## Citations
46
+
47
+ To cite deepvisiontools when used, please cite the official repository: https://forge.inrae.fr/ue-apc/librairies/python/deepvisiontools
48
+
49
+ **Important**: deepvisiontools provides model wrappers and does not reimplement all models. It is the responsibility of the user to also cite the model developers.
50
+
51
+ If you are using one of these models, please cite the corresponding library as well:
52
+
53
+ - `"yolo"`: cite Ultralytics (https://www.ultralytics.com/)
54
+ - `"smp"`: cite segmentation-models-pytorch (https://github.com/qubvel-org/segmentation_models.pytorch)
55
+
56
+ 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.
57
+
58
+ 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/).
59
+
60
+ ## Installation
61
+
62
+ 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**.
63
+
64
+ deepvisiontools is available on PyPI, so you can simply run in a Python environment:
65
+
66
+ ```bash
67
+ pip install deepvisiontools
68
+ ```
69
+
70
+ To install deepvisiontools in development mode, please clone the repository and run:
71
+
72
+ ```bash
73
+ pip install -e deepvisiontools/ # local cloned repo
74
+ ```
75
+
76
+ Finally, to install deepvisiontools with developer extras, move inside the cloned repo and run:
77
+
78
+ ```bash
79
+ pip install -e ".[dev]"
80
+ ```
81
+
82
+ This will include extras like documentation, pytest, nox, etc.
83
+
84
+ ## Documentation and tutorials
85
+
86
+ Official documentation for deepvisiontools can be found here: https://deepvisiontools-1233bd.pages-forge.inrae.fr/
87
+
88
+ To get started with deepvisiontools, after installation you can run:
89
+
90
+ ```bash
91
+ deepvisiontools download-tutorials
92
+ ```
93
+
94
+ You will also need to download the demo datasets:
95
+
96
+ ```bash
97
+ deepvisiontools download-demo-datasets
98
+ ```
99
+
100
+ 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.
101
+
102
+ We then recommend moving to **advanced_usage** to get a broader view of what you can configure in deepvisiontools and all available helpers.
103
+
104
+ Finally, the **hyper_parametrs_optimization** tutorial will explain the usage of Optuna wrappers available in deepvisiontools to perform extensive parameter space searches.
105
+
106
+ ## Monitoring via MLflow
107
+
108
+ deepvisiontools includes MLflow for monitoring, checkpointing and artifacts during training.
109
+
110
+ If you use deepvisiontools as intended, at some point you will end up with an `mlruns` folder.
111
+
112
+ You can use the following command to start MLflow and then open the local page in your browser to display the MLflow UI:
113
+
114
+ ```bash
115
+ mlflow server --backend-store-uri sqlite:////$(pwd)/mlruns/mlflow.db --default-artifact-root file:$(pwd)/mlruns --host 127.0.0.1 --port 5000
116
+ ```
117
+
118
+ An alternative way for Jupyter notebooks is presented in the tutorial.
119
+
120
+ ## License
121
+
122
+ GNU Affero General Public License v3 or later (AGPLv3+) (AGPL-3.0).
123
+
124
+ ## Contributor specifics
125
+
126
+ 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.
127
+
128
+ ### Organization and CI
129
+
130
+ 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*.
131
+
132
+ The deepvisiontools repository has a CI pipeline that includes:
133
+
134
+ - linting / formatting checks with ruff
135
+ - security checks (high-risk issues are blocking only on protected release paths)
136
+ - package build
137
+ - tests (Python 3.10, 3.11, 3.12, 3.13, 3.14)
138
+ - documentation build
139
+
140
+ ### Unit and functional tests
141
+
142
+ For contributors, you can run the local series of unit/functional tests. First, install the additional test-related dependencies.
143
+
144
+ We strongly recommend that you run local tests before creating a merge request.
145
+
146
+ #### Run with coverage
147
+
148
+ ```bash
149
+ coverage run -m pytest # run tests under coverage
150
+ coverage report -m # text coverage summary
151
+ coverage html # HTML coverage report in htmlcov/index.html
152
+ ```
153
+
154
+ #### Running subsets
155
+
156
+ ```bash
157
+ pytest tests/unit -q # only unit tests
158
+ pytest tests/functional -q # only functional tests
159
+ ```
160
+
161
+ #### Run with nox
162
+
163
+ ```bash
164
+ 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
165
+ ```
166
+
167
+ For example:
168
+
169
+ ```bash
170
+ nox -s tests-3.12
171
+ ```
172
+
173
+ ### Check other CI stages locally
174
+
175
+ Use nox, which is installed if `".[dev]"` was used during installation:
176
+
177
+ ```bash
178
+ nox -s ruff # formatting / linting
179
+ nox -s typecheck # type checking with mypy
180
+ nox -s security # security checks with bandit
181
+ nox -s tests-3.xx # CPU-only, non-slow tests on a specific Python version
182
+ nox -s docs # build the docs
183
+ ```
184
+ **note that the nox docs session produces a _nox_doc/ folder, so you can inspect the doc locally**
185
+
186
+ ### Linting and formatting
187
+
188
+ We suggest that you use ruff during development to maintain code compatibility with the tests. You can use ruff to check linting and formatting:
189
+
190
+ ```bash
191
+ ruff check src tests # check linting on src and tests folders
192
+ ruff check --fix src tests # apply safe lint fixes
193
+ ruff format --check src tests # check formatting
194
+ ruff format src tests # apply safe formatting on src and tests folders
195
+ ```
196
+
197
+ Even better is to use ruff in your IDE.
198
+
199
+ ### release on PyPi
200
+ *Only maintainer can create release with propper tags*
201
+
202
+ 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,<8.5.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"]