descriptron-vision 2.1.2__tar.gz → 2.2.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.
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/PKG-INFO +2 -3
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/pyproject.toml +2 -2
- descriptron_vision-2.1.2/NOTICE.bak_pre_212_20260929_1100 +0 -59
- descriptron_vision-2.1.2/pyproject.toml.bak_pre_203_20260924_145320 +0 -64
- descriptron_vision-2.1.2/pyproject.toml.bak_pre_204_20260924_165335 +0 -64
- descriptron_vision-2.1.2/pyproject.toml.bak_pre_210_20260925_103754 +0 -64
- descriptron_vision-2.1.2/pyproject.toml.bak_pre_211_20260925_114912 +0 -64
- descriptron_vision-2.1.2/src/descriptron_vision/cli.py.bak_pre_v52_20260924_142454 +0 -66
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/.gitignore +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/LICENSE +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/NOTICE +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/README.md +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/__init__.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/cli.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/biosyslit_rag_retrieval.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/descriptron_video_track.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/dinov3_landmark_transfer_v51.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/dinov3_landmark_transfer_v52.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/measurement_script_to_try_after_kpts_prediction_measure_kpts_V35.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/sam2_pal_batch_v21.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/README.md +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/d2_predict_fold_v1.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/fix_coco_image_sizes_v1.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/render_detections_v1.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/run_20k_comparison.sh +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/tv_coco_dataset.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/tv_predict_v1.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/tv_predict_v2.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/tv_sweep_v1.py +0 -0
- {descriptron_vision-2.1.2 → descriptron_vision-2.2.0}/src/descriptron_vision/tools/torchvision_det/tv_train_v1.py +0 -0
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: descriptron-vision
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer
|
|
5
5
|
Project-URL: Homepage, https://github.com/alexrvandam/Descriptron
|
|
6
6
|
Author: Alex R. Van Dam
|
|
7
7
|
License: Apache-2.0
|
|
8
8
|
License-File: LICENSE
|
|
9
9
|
License-File: NOTICE
|
|
10
|
-
License-File: NOTICE.bak_pre_212_20260929_1100
|
|
11
10
|
Classifier: Intended Audience :: Science/Research
|
|
12
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
12
|
Classifier: Operating System :: OS Independent
|
|
14
13
|
Classifier: Programming Language :: Python :: 3
|
|
15
14
|
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
16
15
|
Requires-Python: >=3.9
|
|
17
|
-
Requires-Dist: descriptron-core==2.
|
|
16
|
+
Requires-Dist: descriptron-core==2.2.0
|
|
18
17
|
Requires-Dist: einops>=0.7
|
|
19
18
|
Requires-Dist: timm>=0.9
|
|
20
19
|
Requires-Dist: torch>=2.3
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "descriptron-vision"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.2.0"
|
|
8
8
|
description = "Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -26,7 +26,7 @@ classifiers = [
|
|
|
26
26
|
# For CUDA, install torch from PyTorch's own index FIRST, then this package:
|
|
27
27
|
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
28
28
|
dependencies = [
|
|
29
|
-
"descriptron-core==2.
|
|
29
|
+
"descriptron-core==2.2.0",
|
|
30
30
|
# Capped deliberately. Unbounded, pip installs torch 2.14 with ~3 GB of CUDA 13
|
|
31
31
|
# wheels — not the torch 2.4.0+cu121 this system was validated on, and a version
|
|
32
32
|
# in which the AMP calls below are already deprecated. Raise the cap only after
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
Descriptron
|
|
2
|
-
Copyright 2024-2026 Alex R. Van Dam (ORCID 0000-0002-1966-0338)
|
|
3
|
-
|
|
4
|
-
This product includes software developed by Alex R. Van Dam
|
|
5
|
-
https://github.com/alexrvandam/Descriptron
|
|
6
|
-
|
|
7
|
-
Licensed under the Apache License, Version 2.0 (see LICENSE). Under Section
|
|
8
|
-
4(d) of that licence, this NOTICE file must be included with any
|
|
9
|
-
redistribution of this software or of any work derived from it.
|
|
10
|
-
|
|
11
|
-
REQUIRED CITATION
|
|
12
|
-
-----------------
|
|
13
|
-
Anyone who uses Descriptron, or any software derived from it (including
|
|
14
|
-
descriptron-core, descriptron-vision, descriptron-gui and descriptron-mcp), in
|
|
15
|
-
work that is published, presented or distributed must cite:
|
|
16
|
-
|
|
17
|
-
1. The software (Descriptron v2), by the DOI of the version used:
|
|
18
|
-
Van Dam, A. R. (2026). Descriptron: morphology-driven species descriptions,
|
|
19
|
-
keys and delimitation for dark taxa (Version 2.0.1). Zenodo.
|
|
20
|
-
https://doi.org/10.5281/zenodo.22918056
|
|
21
|
-
(all versions: https://doi.org/10.5281/zenodo.17077224;
|
|
22
|
-
repository: https://github.com/alexrvandam/Descriptron)
|
|
23
|
-
|
|
24
|
-
2. The first Descriptron paper:
|
|
25
|
-
Van Dam, A. R. & Štarhová Serbina, L. (2026). Descriptron: Artificial
|
|
26
|
-
intelligence for automating taxonomic species descriptions with a
|
|
27
|
-
user-friendly software package. Systematic Entomology, 51(1), e70005.
|
|
28
|
-
https://doi.org/10.1111/syen.70005
|
|
29
|
-
|
|
30
|
-
3. Once it is published, the Descriptron v2 paper as well. Its reference
|
|
31
|
-
will be added here and in CITATION.cff on publication.
|
|
32
|
-
|
|
33
|
-
BibTeX:
|
|
34
|
-
|
|
35
|
-
@software{vandam_2026_descriptron_v201,
|
|
36
|
-
author = {Van Dam, Alex R.},
|
|
37
|
-
title = {Descriptron: morphology-driven species descriptions, keys and
|
|
38
|
-
delimitation for dark taxa},
|
|
39
|
-
version = {v2.0.1},
|
|
40
|
-
year = {2026},
|
|
41
|
-
publisher = {Zenodo},
|
|
42
|
-
doi = {10.5281/zenodo.22918056},
|
|
43
|
-
url = {https://doi.org/10.5281/zenodo.22918056}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@article{vandam2026descriptron,
|
|
47
|
-
author = {Van Dam, Alex R. and Štarhová Serbina, Liliya},
|
|
48
|
-
title = {Descriptron: Artificial intelligence for automating taxonomic species
|
|
49
|
-
descriptions with a user-friendly software package},
|
|
50
|
-
journal = {Systematic Entomology},
|
|
51
|
-
volume = {51},
|
|
52
|
-
number = {1},
|
|
53
|
-
pages = {e70005},
|
|
54
|
-
year = {2026},
|
|
55
|
-
doi = {10.1111/syen.70005}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
The same information is in CITATION.cff, which GitHub shows as
|
|
59
|
-
"Cite this repository".
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "descriptron-vision"
|
|
7
|
-
version = "2.0.2"
|
|
8
|
-
description = "Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "Apache-2.0" }
|
|
12
|
-
authors = [{ name = "Alex R. Van Dam" }]
|
|
13
|
-
classifiers = [
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Topic :: Scientific/Engineering :: Image Recognition",
|
|
16
|
-
"Intended Audience :: Science/Research",
|
|
17
|
-
"License :: OSI Approved :: Apache Software License",
|
|
18
|
-
"Operating System :: OS Independent",
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
# torch and torchvision are ordinary wheels on Linux, macOS and Windows, so this
|
|
22
|
-
# installs without a compiler. On a Mac the torchvision detectors can use the
|
|
23
|
-
# Apple GPU through PyTorch's MPS device; Detectron2 cannot, which is why the
|
|
24
|
-
# torchvision backend exists.
|
|
25
|
-
#
|
|
26
|
-
# For CUDA, install torch from PyTorch's own index FIRST, then this package:
|
|
27
|
-
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
28
|
-
dependencies = [
|
|
29
|
-
"descriptron-core==2.0.2",
|
|
30
|
-
# Capped deliberately. Unbounded, pip installs torch 2.14 with ~3 GB of CUDA 13
|
|
31
|
-
# wheels — not the torch 2.4.0+cu121 this system was validated on, and a version
|
|
32
|
-
# in which the AMP calls below are already deprecated. Raise the cap only after
|
|
33
|
-
# testing, not before.
|
|
34
|
-
"torch>=2.3", # torch.amp.GradScaler("cuda") in tv_train_v1 needs 2.3
|
|
35
|
-
"torchvision>=0.18",
|
|
36
|
-
"transformers>=4.38", # Florence-2 scale-bar reading
|
|
37
|
-
"timm>=0.9",
|
|
38
|
-
"einops>=0.7",
|
|
39
|
-
"tqdm>=4.65",
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
[project.optional-dependencies]
|
|
43
|
-
# SAM2 is not on PyPI and PyPI rejects a git dependency in package metadata, so
|
|
44
|
-
# it cannot be declared here. It is imported lazily and the error message gives
|
|
45
|
-
# the install command:
|
|
46
|
-
# pip install git+https://github.com/facebookresearch/segment-anything-2
|
|
47
|
-
# Detectron2 is the same story, and additionally needs a compiler; see the
|
|
48
|
-
# Docker image if you would rather not build it.
|
|
49
|
-
ocr = ["easyocr>=1.7"]
|
|
50
|
-
dev = ["pytest>=7", "build>=1", "twine>=5"]
|
|
51
|
-
|
|
52
|
-
[project.scripts]
|
|
53
|
-
descriptron-train = "descriptron_vision.cli:train"
|
|
54
|
-
descriptron-predict = "descriptron_vision.cli:predict"
|
|
55
|
-
descriptron-sweep = "descriptron_vision.cli:sweep"
|
|
56
|
-
descriptron-sam2pal = "descriptron_vision.cli:sam2_pal"
|
|
57
|
-
descriptron-dinoland = "descriptron_vision.cli:dinoland"
|
|
58
|
-
descriptron-measure = "descriptron_vision.cli:measure"
|
|
59
|
-
|
|
60
|
-
[project.urls]
|
|
61
|
-
Homepage = "https://github.com/alexrvandam/Descriptron"
|
|
62
|
-
|
|
63
|
-
[tool.hatch.build.targets.wheel]
|
|
64
|
-
packages = ["src/descriptron_vision"]
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "descriptron-vision"
|
|
7
|
-
version = "2.0.3"
|
|
8
|
-
description = "Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "Apache-2.0" }
|
|
12
|
-
authors = [{ name = "Alex R. Van Dam" }]
|
|
13
|
-
classifiers = [
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Topic :: Scientific/Engineering :: Image Recognition",
|
|
16
|
-
"Intended Audience :: Science/Research",
|
|
17
|
-
"License :: OSI Approved :: Apache Software License",
|
|
18
|
-
"Operating System :: OS Independent",
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
# torch and torchvision are ordinary wheels on Linux, macOS and Windows, so this
|
|
22
|
-
# installs without a compiler. On a Mac the torchvision detectors can use the
|
|
23
|
-
# Apple GPU through PyTorch's MPS device; Detectron2 cannot, which is why the
|
|
24
|
-
# torchvision backend exists.
|
|
25
|
-
#
|
|
26
|
-
# For CUDA, install torch from PyTorch's own index FIRST, then this package:
|
|
27
|
-
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
28
|
-
dependencies = [
|
|
29
|
-
"descriptron-core==2.0.3",
|
|
30
|
-
# Capped deliberately. Unbounded, pip installs torch 2.14 with ~3 GB of CUDA 13
|
|
31
|
-
# wheels — not the torch 2.4.0+cu121 this system was validated on, and a version
|
|
32
|
-
# in which the AMP calls below are already deprecated. Raise the cap only after
|
|
33
|
-
# testing, not before.
|
|
34
|
-
"torch>=2.3", # torch.amp.GradScaler("cuda") in tv_train_v1 needs 2.3
|
|
35
|
-
"torchvision>=0.18",
|
|
36
|
-
"transformers>=4.38", # Florence-2 scale-bar reading
|
|
37
|
-
"timm>=0.9",
|
|
38
|
-
"einops>=0.7",
|
|
39
|
-
"tqdm>=4.65",
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
[project.optional-dependencies]
|
|
43
|
-
# SAM2 is not on PyPI and PyPI rejects a git dependency in package metadata, so
|
|
44
|
-
# it cannot be declared here. It is imported lazily and the error message gives
|
|
45
|
-
# the install command:
|
|
46
|
-
# pip install git+https://github.com/facebookresearch/segment-anything-2
|
|
47
|
-
# Detectron2 is the same story, and additionally needs a compiler; see the
|
|
48
|
-
# Docker image if you would rather not build it.
|
|
49
|
-
ocr = ["easyocr>=1.7"]
|
|
50
|
-
dev = ["pytest>=7", "build>=1", "twine>=5"]
|
|
51
|
-
|
|
52
|
-
[project.scripts]
|
|
53
|
-
descriptron-train = "descriptron_vision.cli:train"
|
|
54
|
-
descriptron-predict = "descriptron_vision.cli:predict"
|
|
55
|
-
descriptron-sweep = "descriptron_vision.cli:sweep"
|
|
56
|
-
descriptron-sam2pal = "descriptron_vision.cli:sam2_pal"
|
|
57
|
-
descriptron-dinoland = "descriptron_vision.cli:dinoland"
|
|
58
|
-
descriptron-measure = "descriptron_vision.cli:measure"
|
|
59
|
-
|
|
60
|
-
[project.urls]
|
|
61
|
-
Homepage = "https://github.com/alexrvandam/Descriptron"
|
|
62
|
-
|
|
63
|
-
[tool.hatch.build.targets.wheel]
|
|
64
|
-
packages = ["src/descriptron_vision"]
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "descriptron-vision"
|
|
7
|
-
version = "2.0.4"
|
|
8
|
-
description = "Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "Apache-2.0" }
|
|
12
|
-
authors = [{ name = "Alex R. Van Dam" }]
|
|
13
|
-
classifiers = [
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Topic :: Scientific/Engineering :: Image Recognition",
|
|
16
|
-
"Intended Audience :: Science/Research",
|
|
17
|
-
"License :: OSI Approved :: Apache Software License",
|
|
18
|
-
"Operating System :: OS Independent",
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
# torch and torchvision are ordinary wheels on Linux, macOS and Windows, so this
|
|
22
|
-
# installs without a compiler. On a Mac the torchvision detectors can use the
|
|
23
|
-
# Apple GPU through PyTorch's MPS device; Detectron2 cannot, which is why the
|
|
24
|
-
# torchvision backend exists.
|
|
25
|
-
#
|
|
26
|
-
# For CUDA, install torch from PyTorch's own index FIRST, then this package:
|
|
27
|
-
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
28
|
-
dependencies = [
|
|
29
|
-
"descriptron-core==2.0.4",
|
|
30
|
-
# Capped deliberately. Unbounded, pip installs torch 2.14 with ~3 GB of CUDA 13
|
|
31
|
-
# wheels — not the torch 2.4.0+cu121 this system was validated on, and a version
|
|
32
|
-
# in which the AMP calls below are already deprecated. Raise the cap only after
|
|
33
|
-
# testing, not before.
|
|
34
|
-
"torch>=2.3", # torch.amp.GradScaler("cuda") in tv_train_v1 needs 2.3
|
|
35
|
-
"torchvision>=0.18",
|
|
36
|
-
"transformers>=4.38", # Florence-2 scale-bar reading
|
|
37
|
-
"timm>=0.9",
|
|
38
|
-
"einops>=0.7",
|
|
39
|
-
"tqdm>=4.65",
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
[project.optional-dependencies]
|
|
43
|
-
# SAM2 is not on PyPI and PyPI rejects a git dependency in package metadata, so
|
|
44
|
-
# it cannot be declared here. It is imported lazily and the error message gives
|
|
45
|
-
# the install command:
|
|
46
|
-
# pip install git+https://github.com/facebookresearch/segment-anything-2
|
|
47
|
-
# Detectron2 is the same story, and additionally needs a compiler; see the
|
|
48
|
-
# Docker image if you would rather not build it.
|
|
49
|
-
ocr = ["easyocr>=1.7"]
|
|
50
|
-
dev = ["pytest>=7", "build>=1", "twine>=5"]
|
|
51
|
-
|
|
52
|
-
[project.scripts]
|
|
53
|
-
descriptron-train = "descriptron_vision.cli:train"
|
|
54
|
-
descriptron-predict = "descriptron_vision.cli:predict"
|
|
55
|
-
descriptron-sweep = "descriptron_vision.cli:sweep"
|
|
56
|
-
descriptron-sam2pal = "descriptron_vision.cli:sam2_pal"
|
|
57
|
-
descriptron-dinoland = "descriptron_vision.cli:dinoland"
|
|
58
|
-
descriptron-measure = "descriptron_vision.cli:measure"
|
|
59
|
-
|
|
60
|
-
[project.urls]
|
|
61
|
-
Homepage = "https://github.com/alexrvandam/Descriptron"
|
|
62
|
-
|
|
63
|
-
[tool.hatch.build.targets.wheel]
|
|
64
|
-
packages = ["src/descriptron_vision"]
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["hatchling"]
|
|
3
|
-
build-backend = "hatchling.build"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "descriptron-vision"
|
|
7
|
-
version = "2.1.0"
|
|
8
|
-
description = "Mask and landmark prediction for Descriptron: torchvision detectors, SAM2-PAL propagation, DINOv3 landmark transfer"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "Apache-2.0" }
|
|
12
|
-
authors = [{ name = "Alex R. Van Dam" }]
|
|
13
|
-
classifiers = [
|
|
14
|
-
"Programming Language :: Python :: 3",
|
|
15
|
-
"Topic :: Scientific/Engineering :: Image Recognition",
|
|
16
|
-
"Intended Audience :: Science/Research",
|
|
17
|
-
"License :: OSI Approved :: Apache Software License",
|
|
18
|
-
"Operating System :: OS Independent",
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
# torch and torchvision are ordinary wheels on Linux, macOS and Windows, so this
|
|
22
|
-
# installs without a compiler. On a Mac the torchvision detectors can use the
|
|
23
|
-
# Apple GPU through PyTorch's MPS device; Detectron2 cannot, which is why the
|
|
24
|
-
# torchvision backend exists.
|
|
25
|
-
#
|
|
26
|
-
# For CUDA, install torch from PyTorch's own index FIRST, then this package:
|
|
27
|
-
# pip install torch torchvision --index-url https://download.pytorch.org/whl/cu121
|
|
28
|
-
dependencies = [
|
|
29
|
-
"descriptron-core==2.1.0",
|
|
30
|
-
# Capped deliberately. Unbounded, pip installs torch 2.14 with ~3 GB of CUDA 13
|
|
31
|
-
# wheels — not the torch 2.4.0+cu121 this system was validated on, and a version
|
|
32
|
-
# in which the AMP calls below are already deprecated. Raise the cap only after
|
|
33
|
-
# testing, not before.
|
|
34
|
-
"torch>=2.3", # torch.amp.GradScaler("cuda") in tv_train_v1 needs 2.3
|
|
35
|
-
"torchvision>=0.18",
|
|
36
|
-
"transformers>=4.38", # Florence-2 scale-bar reading
|
|
37
|
-
"timm>=0.9",
|
|
38
|
-
"einops>=0.7",
|
|
39
|
-
"tqdm>=4.65",
|
|
40
|
-
]
|
|
41
|
-
|
|
42
|
-
[project.optional-dependencies]
|
|
43
|
-
# SAM2 is not on PyPI and PyPI rejects a git dependency in package metadata, so
|
|
44
|
-
# it cannot be declared here. It is imported lazily and the error message gives
|
|
45
|
-
# the install command:
|
|
46
|
-
# pip install git+https://github.com/facebookresearch/segment-anything-2
|
|
47
|
-
# Detectron2 is the same story, and additionally needs a compiler; see the
|
|
48
|
-
# Docker image if you would rather not build it.
|
|
49
|
-
ocr = ["easyocr>=1.7"]
|
|
50
|
-
dev = ["pytest>=7", "build>=1", "twine>=5"]
|
|
51
|
-
|
|
52
|
-
[project.scripts]
|
|
53
|
-
descriptron-train = "descriptron_vision.cli:train"
|
|
54
|
-
descriptron-predict = "descriptron_vision.cli:predict"
|
|
55
|
-
descriptron-sweep = "descriptron_vision.cli:sweep"
|
|
56
|
-
descriptron-sam2pal = "descriptron_vision.cli:sam2_pal"
|
|
57
|
-
descriptron-dinoland = "descriptron_vision.cli:dinoland"
|
|
58
|
-
descriptron-measure = "descriptron_vision.cli:measure"
|
|
59
|
-
|
|
60
|
-
[project.urls]
|
|
61
|
-
Homepage = "https://github.com/alexrvandam/Descriptron"
|
|
62
|
-
|
|
63
|
-
[tool.hatch.build.targets.wheel]
|
|
64
|
-
packages = ["src/descriptron_vision"]
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
descriptron_vision.cli — detectors, propagation and landmark transfer
|
|
3
|
-
=====================================================================
|
|
4
|
-
|
|
5
|
-
Same dispatch as `descriptron_core.cli`. The two dependencies that are not on
|
|
6
|
-
PyPI — SAM2 and Detectron2 — are not declared anywhere: PyPI rejects a git
|
|
7
|
-
dependency in package metadata. They are imported lazily by the programs that
|
|
8
|
-
need them, and `require()` below turns the resulting ImportError into the exact
|
|
9
|
-
command to run.
|
|
10
|
-
"""
|
|
11
|
-
from __future__ import annotations
|
|
12
|
-
|
|
13
|
-
import sys
|
|
14
|
-
|
|
15
|
-
from descriptron_core.cli import run as _run_core # noqa: F401 (shared behaviour)
|
|
16
|
-
from descriptron_core.cli import data_path # noqa: F401
|
|
17
|
-
|
|
18
|
-
import os
|
|
19
|
-
import runpy
|
|
20
|
-
from importlib.resources import files
|
|
21
|
-
from pathlib import Path
|
|
22
|
-
|
|
23
|
-
INSTALL_HINTS = {
|
|
24
|
-
"sam2": ("SAM2 is not on PyPI, so it cannot be a declared dependency.\n"
|
|
25
|
-
" pip install git+https://github.com/facebookresearch/segment-anything-2"),
|
|
26
|
-
"detectron2": ("Detectron2 is not on PyPI and must be compiled:\n"
|
|
27
|
-
" pip install git+https://github.com/facebookresearch/detectron2\n"
|
|
28
|
-
"It needs a C++/CUDA toolchain and has no macOS wheels. If you would\n"
|
|
29
|
-
"rather not build it, the Docker image carries it ready to run, and the\n"
|
|
30
|
-
"torchvision backend needs none of this."),
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
def require(module: str):
|
|
35
|
-
"""Import an optional heavyweight dependency, or explain how to get it."""
|
|
36
|
-
try:
|
|
37
|
-
return __import__(module)
|
|
38
|
-
except ImportError as exc:
|
|
39
|
-
hint = INSTALL_HINTS.get(module, f" pip install {module}")
|
|
40
|
-
raise SystemExit(f"{module} is required for this step but is not installed.\n"
|
|
41
|
-
f"{hint}\n\n(original error: {exc})") from exc
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def tools_dir() -> Path:
|
|
45
|
-
return Path(str(files("descriptron_vision") / "tools"))
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def _run(script: str, argv: list[str], subdir: str | None = None) -> None:
|
|
49
|
-
base = tools_dir() / subdir if subdir else tools_dir()
|
|
50
|
-
path = base / script
|
|
51
|
-
if not path.exists():
|
|
52
|
-
raise SystemExit(f"{path} is missing — was sync_sources.py run before building?")
|
|
53
|
-
sys.path.insert(0, str(path.parent))
|
|
54
|
-
sys.path.insert(0, str(tools_dir()))
|
|
55
|
-
os.environ.setdefault("DESCRIPTRON_DATA", str(data_path()))
|
|
56
|
-
sys.argv = [str(path), *argv]
|
|
57
|
-
runpy.run_path(str(path), run_name="__main__")
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def train(): _run("tv_train_v1.py", sys.argv[1:], "torchvision_det")
|
|
61
|
-
def predict(): _run("tv_predict_v1.py", sys.argv[1:], "torchvision_det")
|
|
62
|
-
def sweep(): _run("tv_sweep_v1.py", sys.argv[1:], "torchvision_det")
|
|
63
|
-
def sam2_pal(): _run("sam2_pal_batch_v21.py", sys.argv[1:])
|
|
64
|
-
def dinoland(): _run("dinov3_landmark_transfer_v51.py", sys.argv[1:])
|
|
65
|
-
def measure():
|
|
66
|
-
_run("measurement_script_to_try_after_kpts_prediction_measure_kpts_V35.py", sys.argv[1:])
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|