euprima 0.1.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 (56) hide show
  1. euprima-0.1.1/.gitignore +3 -0
  2. euprima-0.1.1/.gitmodules +3 -0
  3. euprima-0.1.1/PKG-INFO +50 -0
  4. euprima-0.1.1/README.md +41 -0
  5. euprima-0.1.1/pyproject.toml +18 -0
  6. euprima-0.1.1/src/CMakeLists.txt +14 -0
  7. euprima-0.1.1/src/cppbinding/.clang-format +5 -0
  8. euprima-0.1.1/src/cppbinding/profiles.cpp +2039 -0
  9. euprima-0.1.1/src/euprima/__init__.py +3 -0
  10. euprima-0.1.1/tests/.gitignore +0 -0
  11. euprima-0.1.1/tests/benchmarks/benchmark_all.py +136 -0
  12. euprima-0.1.1/tests/benchmarks/benchmark_dlotko_gurnari.py +108 -0
  13. euprima-0.1.1/tests/benchmarks/benchmark_hale.py +48 -0
  14. euprima-0.1.1/tests/benchmarks/benchmark_structured_images.py +72 -0
  15. euprima-0.1.1/tests/benchmarks/benchmark_structured_images_html.py +161 -0
  16. euprima-0.1.1/tests/benchmarks/results/benchmark_all.csv +6 -0
  17. euprima-0.1.1/tests/benchmarks/results/benchmark_all_2.csv +6 -0
  18. euprima-0.1.1/tests/benchmarks/results/benchmark_dlotko_gurnari.csv +6 -0
  19. euprima-0.1.1/tests/benchmarks/results/benchmark_hale.csv +9 -0
  20. euprima-0.1.1/tests/benchmarks/results/benchmark_hale_new.csv +9 -0
  21. euprima-0.1.1/tests/benchmarks/results/benchmark_structured_images.csv +6 -0
  22. euprima-0.1.1/tests/benchmarks/results/benchmark_structured_images.html +154 -0
  23. euprima-0.1.1/tests/benchmarks/results/benchmark_structured_images_2.csv +6 -0
  24. euprima-0.1.1/tests/benchmarks/results/benchmark_structured_images_html.csv +10 -0
  25. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_all.pdf +0 -0
  26. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_all.py +105 -0
  27. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_all_without_eulearning.pdf +0 -0
  28. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_all_without_eulearning.py +107 -0
  29. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_hale.pdf +0 -0
  30. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_hale.py +66 -0
  31. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_hale_2.pdf +0 -0
  32. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_hale_3.pdf +0 -0
  33. euprima-0.1.1/tests/benchmarks/results/plots/plot_benchmark_structured_images.py +85 -0
  34. euprima-0.1.1/tests/benchmarks/test-images/bird.jpg +0 -0
  35. euprima-0.1.1/tests/benchmarks/test-images/desert.jpg +0 -0
  36. euprima-0.1.1/tests/benchmarks/test-images/image-sources.md +19 -0
  37. euprima-0.1.1/tests/benchmarks/test-images/minarett.jpg +0 -0
  38. euprima-0.1.1/tests/benchmarks/test-images/mountains-silhouette.jpg +0 -0
  39. euprima-0.1.1/tests/benchmarks/test-images/mountains.jpg +0 -0
  40. euprima-0.1.1/tests/benchmarks/test-images/night-sky-lines.jpg +0 -0
  41. euprima-0.1.1/tests/benchmarks/test-images/ship.jpg +0 -0
  42. euprima-0.1.1/tests/benchmarks/test-images/tigger.jpg +0 -0
  43. euprima-0.1.1/tests/benchmarks/test-images/white-flower-red-background.jpg +0 -0
  44. euprima-0.1.1/tests/benchmarks/utils/benchmark_utils.py +22 -0
  45. euprima-0.1.1/tests/benchmarks/utils/round_csv.py +70 -0
  46. euprima-0.1.1/tests/benchmarks/utils/transpose_and_round_csv.py +74 -0
  47. euprima-0.1.1/tests/benchmarks/utils/transpose_csv.py +44 -0
  48. euprima-0.1.1/tests/eulearning/eulearning/datasets.py +610 -0
  49. euprima-0.1.1/tests/eulearning/eulearning/descriptors.py +377 -0
  50. euprima-0.1.1/tests/eulearning/eulearning/utils.py +112 -0
  51. euprima-0.1.1/tests/pyproject.toml +13 -0
  52. euprima-0.1.1/tests/uv.lock +488 -0
  53. euprima-0.1.1/tests/validation/profiles.py +80 -0
  54. euprima-0.1.1/tests/validation/testing_eulearning.py +65 -0
  55. euprima-0.1.1/tests/validation/utils/testing_utils.py +33 -0
  56. euprima-0.1.1/uv.lock +564 -0
@@ -0,0 +1,3 @@
1
+ .DS_Store
2
+ dist/
3
+ .pypi-setup/
@@ -0,0 +1,3 @@
1
+ [submodule "tests/eulearning"]
2
+ path = tests/eulearning
3
+ url = https://github.com/vadimlebovici/eulearning.git
euprima-0.1.1/PKG-INFO ADDED
@@ -0,0 +1,50 @@
1
+ Metadata-Version: 2.2
2
+ Name: euprima
3
+ Version: 0.1.1
4
+ Summary: Euler characteristic profiles for image analysis
5
+ Requires-Python: >=3.8
6
+ Requires-Dist: numpy
7
+ Requires-Dist: pandas
8
+ Description-Content-Type: text/markdown
9
+
10
+ # euprima
11
+ <b>Eu</b>ler (characteristic) <b>pr</b>ofiles for <b>im</b>age <b>a</b>nalysis.
12
+
13
+ # Disclaimer
14
+ This project was started as a prototype implementation for my bachelors thesis on the _efficient computation of Euler characteristic profiles for three-channel digital images_.
15
+ Once the thesis has been accepted, it will also be linked to from this README.
16
+
17
+ At the moment this repository is still very much a **work in progress** and hence very unorganized and messy.
18
+ Once I finally come up with a better (i.e. more organized) folder structure, this repository will be reorganized accordingly.
19
+
20
+ # Installing the Python package
21
+ You can find the Python interface on PyPI as the [`euprima`]() package.
22
+ It can be installed using
23
+ ```bash
24
+ pip install euprima
25
+ ```
26
+ For the installation you will need a C++ compiler, `cmake` and `pybind11`.
27
+
28
+ # Closing the repository
29
+ This repository uses the [`eulearning`](https://github.com/vadimlebovici/eulearning) repository by Hacquard and Lebovici as a Git submodule for benchmarking.
30
+ Clone the repository using the `--recursive` flag to pull down the benchmark files automatically:
31
+
32
+ ```bash
33
+ git clone --recursive https://github.com/mazmap/euprima.git
34
+ ```
35
+
36
+ In case you forgot the `--recursive` flag, you can execute
37
+ ```bash
38
+ git submodule update --init --recursive
39
+ ```
40
+ after cloning
41
+
42
+ # Testing and Benchmarks
43
+ For executing the tests and benchmarks in `tests/` you will need various Python packages such as `numpy` and `pandas`.
44
+ To install all required packages, you can use the [`uv`](https://docs.astral.sh/uv/) package/project manager.
45
+ All dependencies are listed in `tests/pyproject.toml` (including the `euprima` package).
46
+ For the benchmarks against the [`eulearning`](https://github.com/vadimlebovici/eulearning) implementation by Hacquard and Lebovici, you have to clone the `eulearning/` folder from their repository into `tests/eulearning/` or clone it as a submodule as described above.
47
+
48
+ # Documentation
49
+ I am working on a documentation with clear usage examples for the functions we provide via the `pybind11` interface.
50
+ For now, consult the test and benchmark files in `tests/` to get an idea of how the functions are supposed to be used.
@@ -0,0 +1,41 @@
1
+ # euprima
2
+ <b>Eu</b>ler (characteristic) <b>pr</b>ofiles for <b>im</b>age <b>a</b>nalysis.
3
+
4
+ # Disclaimer
5
+ This project was started as a prototype implementation for my bachelors thesis on the _efficient computation of Euler characteristic profiles for three-channel digital images_.
6
+ Once the thesis has been accepted, it will also be linked to from this README.
7
+
8
+ At the moment this repository is still very much a **work in progress** and hence very unorganized and messy.
9
+ Once I finally come up with a better (i.e. more organized) folder structure, this repository will be reorganized accordingly.
10
+
11
+ # Installing the Python package
12
+ You can find the Python interface on PyPI as the [`euprima`]() package.
13
+ It can be installed using
14
+ ```bash
15
+ pip install euprima
16
+ ```
17
+ For the installation you will need a C++ compiler, `cmake` and `pybind11`.
18
+
19
+ # Closing the repository
20
+ This repository uses the [`eulearning`](https://github.com/vadimlebovici/eulearning) repository by Hacquard and Lebovici as a Git submodule for benchmarking.
21
+ Clone the repository using the `--recursive` flag to pull down the benchmark files automatically:
22
+
23
+ ```bash
24
+ git clone --recursive https://github.com/mazmap/euprima.git
25
+ ```
26
+
27
+ In case you forgot the `--recursive` flag, you can execute
28
+ ```bash
29
+ git submodule update --init --recursive
30
+ ```
31
+ after cloning
32
+
33
+ # Testing and Benchmarks
34
+ For executing the tests and benchmarks in `tests/` you will need various Python packages such as `numpy` and `pandas`.
35
+ To install all required packages, you can use the [`uv`](https://docs.astral.sh/uv/) package/project manager.
36
+ All dependencies are listed in `tests/pyproject.toml` (including the `euprima` package).
37
+ For the benchmarks against the [`eulearning`](https://github.com/vadimlebovici/eulearning) implementation by Hacquard and Lebovici, you have to clone the `eulearning/` folder from their repository into `tests/eulearning/` or clone it as a submodule as described above.
38
+
39
+ # Documentation
40
+ I am working on a documentation with clear usage examples for the functions we provide via the `pybind11` interface.
41
+ For now, consult the test and benchmark files in `tests/` to get an idea of how the functions are supposed to be used.
@@ -0,0 +1,18 @@
1
+ [build-system]
2
+ requires = ["scikit-build-core>=0.5.0", "pybind11>=2.13.1"]
3
+ build-backend = "scikit_build_core.build"
4
+
5
+ [project]
6
+ name = "euprima"
7
+ version = "0.1.1"
8
+ description = "Euler characteristic profiles for image analysis"
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ dependencies = [
12
+ "numpy",
13
+ "pandas"
14
+ ]
15
+
16
+ [tool.scikit-build]
17
+ cmake.build-type = "Release"
18
+ cmake.source-dir = "src"
@@ -0,0 +1,14 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+ project(euprima LANGUAGES CXX)
3
+
4
+ find_package(pybind11 REQUIRED)
5
+
6
+ pybind11_add_module(_core cppbinding/profiles.cpp)
7
+
8
+ target_compile_options(_core PRIVATE
9
+ $<$<CXX_COMPILER_ID:GNU>:-O3>
10
+ $<$<CXX_COMPILER_ID:Clang>:-O3>
11
+ $<$<CXX_COMPILER_ID:MSVC>:/O2>
12
+ )
13
+
14
+ install(TARGETS _core DESTINATION euprima)
@@ -0,0 +1,5 @@
1
+ BasedOnStyle: LLVM
2
+ IndentWidth: 4 # Sets spacing/indent to 4 spaces
3
+ IndentCaseLabels: true
4
+ AllowShortBlocksOnASingleLine: Never
5
+ # SpaceBeforeParens: ControlStatements # Adds correct spacing, e.g., "if (cond)" instead of "if(cond)"