aniposelib-pytorch 0.9.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.
- aniposelib_pytorch-0.9.0/LICENSE +25 -0
- aniposelib_pytorch-0.9.0/PKG-INFO +69 -0
- aniposelib_pytorch-0.9.0/README.md +37 -0
- aniposelib_pytorch-0.9.0/aniposelib/__init__.py +26 -0
- aniposelib_pytorch-0.9.0/aniposelib/boards.py +741 -0
- aniposelib_pytorch-0.9.0/aniposelib/cameras.py +2373 -0
- aniposelib_pytorch-0.9.0/aniposelib/utils.py +246 -0
- aniposelib_pytorch-0.9.0/aniposelib_pytorch.egg-info/PKG-INFO +69 -0
- aniposelib_pytorch-0.9.0/aniposelib_pytorch.egg-info/SOURCES.txt +17 -0
- aniposelib_pytorch-0.9.0/aniposelib_pytorch.egg-info/dependency_links.txt +1 -0
- aniposelib_pytorch-0.9.0/aniposelib_pytorch.egg-info/requires.txt +17 -0
- aniposelib_pytorch-0.9.0/aniposelib_pytorch.egg-info/top_level.txt +1 -0
- aniposelib_pytorch-0.9.0/pyproject.toml +51 -0
- aniposelib_pytorch-0.9.0/setup.cfg +4 -0
- aniposelib_pytorch-0.9.0/tests/test_calibration.py +149 -0
- aniposelib_pytorch-0.9.0/tests/test_cameragroup.py +147 -0
- aniposelib_pytorch-0.9.0/tests/test_fisheye.py +350 -0
- aniposelib_pytorch-0.9.0/tests/test_n_dist.py +249 -0
- aniposelib_pytorch-0.9.0/tests/test_triangulate_optim.py +77 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
BSD 2-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019-2023, Lili Karashchuk
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
17
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
18
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
19
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
20
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
21
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
24
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
25
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: aniposelib-pytorch
|
|
3
|
+
Version: 0.9.0
|
|
4
|
+
Summary: PyTorch/GPU camera calibration and triangulation library for Anipose (torch fork of aniposelib; imports as `aniposelib`)
|
|
5
|
+
Author-email: Lili Karashchuk <lili.karashchuk@gmail.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/lambdaloop/anipose-lib/tree/pytorch
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Topic :: Scientific/Engineering
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Image Recognition
|
|
12
|
+
Requires-Python: >=3.9
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: aniposelib==0.0.1
|
|
16
|
+
Requires-Dist: torch>=2.1
|
|
17
|
+
Requires-Dist: opencv-python<5,>=4.7.0.68
|
|
18
|
+
Requires-Dist: numba
|
|
19
|
+
Requires-Dist: pandas
|
|
20
|
+
Requires-Dist: numpy
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: toml
|
|
23
|
+
Requires-Dist: tqdm
|
|
24
|
+
Requires-Dist: einops
|
|
25
|
+
Provides-Extra: dev
|
|
26
|
+
Requires-Dist: pytest; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
28
|
+
Requires-Dist: hypothesis; extra == "dev"
|
|
29
|
+
Requires-Dist: build; extra == "dev"
|
|
30
|
+
Requires-Dist: twine; extra == "dev"
|
|
31
|
+
Dynamic: license-file
|
|
32
|
+
|
|
33
|
+
# Anipose lib
|
|
34
|
+
|
|
35
|
+
[](https://opensource.org/licenses/BSD-2-Clause)
|
|
36
|
+
|
|
37
|
+
An easy-to-use library for calibrating cameras and triangulation in Python.
|
|
38
|
+
|
|
39
|
+
This is the backend library for the [Anipose](https://github.com/lambdaloop/anipose) package.
|
|
40
|
+
|
|
41
|
+
## aniposelib-pytorch
|
|
42
|
+
|
|
43
|
+
This branch is published on PyPI as **`aniposelib-pytorch`**: the PyTorch/GPU version of aniposelib
|
|
44
|
+
(cameras are `torch.nn.Module`s, GPU-batched triangulation and bundle adjustment). It still
|
|
45
|
+
**imports as `aniposelib`**.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
pip install aniposelib-pytorch
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Install torch with the CUDA build that matches your GPU first if you need a specific one
|
|
52
|
+
(see https://pytorch.org/get-started/locally/).
|
|
53
|
+
|
|
54
|
+
**It cannot be installed alongside classic `aniposelib`** (numpy, 0.8.x) because both provide the
|
|
55
|
+
`aniposelib` import. `aniposelib-pytorch` depends on a file-less placeholder `aniposelib==0.0.1`, so
|
|
56
|
+
pip/uv refuse environments that also require classic aniposelib. Replace any `aniposelib`
|
|
57
|
+
requirement in your project with `aniposelib-pytorch`. If both somehow end up installed, `import
|
|
58
|
+
aniposelib` raises an error; fix it with:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
pip uninstall -y aniposelib aniposelib-pytorch && pip install aniposelib-pytorch
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Do not `pip install aniposelib==0.8.x` into an environment with aniposelib-pytorch: it overwrites
|
|
65
|
+
the package files. Classic aniposelib is still available with `pip install aniposelib` in a
|
|
66
|
+
separate environment.
|
|
67
|
+
|
|
68
|
+
The [documentation](https://anipose.readthedocs.io/en/latest/aniposelib-tutorial.html) is located in Anipose repository.
|
|
69
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Anipose lib
|
|
2
|
+
|
|
3
|
+
[](https://opensource.org/licenses/BSD-2-Clause)
|
|
4
|
+
|
|
5
|
+
An easy-to-use library for calibrating cameras and triangulation in Python.
|
|
6
|
+
|
|
7
|
+
This is the backend library for the [Anipose](https://github.com/lambdaloop/anipose) package.
|
|
8
|
+
|
|
9
|
+
## aniposelib-pytorch
|
|
10
|
+
|
|
11
|
+
This branch is published on PyPI as **`aniposelib-pytorch`**: the PyTorch/GPU version of aniposelib
|
|
12
|
+
(cameras are `torch.nn.Module`s, GPU-batched triangulation and bundle adjustment). It still
|
|
13
|
+
**imports as `aniposelib`**.
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install aniposelib-pytorch
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install torch with the CUDA build that matches your GPU first if you need a specific one
|
|
20
|
+
(see https://pytorch.org/get-started/locally/).
|
|
21
|
+
|
|
22
|
+
**It cannot be installed alongside classic `aniposelib`** (numpy, 0.8.x) because both provide the
|
|
23
|
+
`aniposelib` import. `aniposelib-pytorch` depends on a file-less placeholder `aniposelib==0.0.1`, so
|
|
24
|
+
pip/uv refuse environments that also require classic aniposelib. Replace any `aniposelib`
|
|
25
|
+
requirement in your project with `aniposelib-pytorch`. If both somehow end up installed, `import
|
|
26
|
+
aniposelib` raises an error; fix it with:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip uninstall -y aniposelib aniposelib-pytorch && pip install aniposelib-pytorch
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Do not `pip install aniposelib==0.8.x` into an environment with aniposelib-pytorch: it overwrites
|
|
33
|
+
the package files. Classic aniposelib is still available with `pip install aniposelib` in a
|
|
34
|
+
separate environment.
|
|
35
|
+
|
|
36
|
+
The [documentation](https://anipose.readthedocs.io/en/latest/aniposelib-tutorial.html) is located in Anipose repository.
|
|
37
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
|
|
3
|
+
# aniposelib-pytorch provides the `aniposelib` import, so it cannot coexist with the
|
|
4
|
+
# classic numpy `aniposelib` distribution (one would overwrite the other's files).
|
|
5
|
+
# The only allowed `aniposelib` distribution is the file-less placeholder 0.0.1 that
|
|
6
|
+
# aniposelib-pytorch depends on.
|
|
7
|
+
from importlib import metadata as _md
|
|
8
|
+
try:
|
|
9
|
+
_classic_version = _md.version('aniposelib')
|
|
10
|
+
except _md.PackageNotFoundError:
|
|
11
|
+
_classic_version = None
|
|
12
|
+
if _classic_version is not None and _classic_version != '0.0.1':
|
|
13
|
+
raise ImportError(
|
|
14
|
+
"Classic 'aniposelib' {} is installed alongside 'aniposelib-pytorch'. Both provide "
|
|
15
|
+
"the 'aniposelib' import, so one has overwritten the other's files. Fix with:\n"
|
|
16
|
+
" pip uninstall -y aniposelib aniposelib-pytorch && pip install aniposelib-pytorch\n"
|
|
17
|
+
"and replace any 'aniposelib' requirement (e.g. 'aniposelib>=0.7.0') with "
|
|
18
|
+
"'aniposelib-pytorch'.".format(_classic_version))
|
|
19
|
+
del _md, _classic_version
|
|
20
|
+
|
|
21
|
+
__version__ = '0.9.0'
|
|
22
|
+
VERSION = __version__
|
|
23
|
+
DISTRIBUTION = 'aniposelib-pytorch'
|
|
24
|
+
BACKEND = 'torch'
|
|
25
|
+
|
|
26
|
+
from . import boards, cameras, utils
|