venv with python3.9 (make sure to have python3.9-dev and python3.9-distutils installed, also you can install python3.9 with pyenv if it is not available and you have no sudo permissions)

pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113

pip install numpy==1.21.6 pip install -r requirements.txt (removing chamfer, charset-normalizer, emd-ext, mpi4py, numpy, pytorch-lightning, SharedArray, sklearn, torch, torchaudio and torchvision)

pip install SharedArray==3.2.4

pip install pybind11

from within the venv, compile c++ functions: cd c_utils

mkdir build && cd build

cmake -DPYTHON_EXECUTABLE=$(which python) -Dpybind11_DIR=$(python3.9 -m pybind11 --cmakedir) ..

make

append the build directory to the PYTHONPATH

pip install pytorch-lightning==1.6.5

pip install DetectionMetrics/

pyproject for LSK3DNet

[tool.poetry]
name = "detectionmetrics"
version = "2.2.0"
description = "Tools for evaluating segmentation and object detection models"
authors = ["JdeRobot", "d.pascualhe <[email protected]>"]
readme = "README.md"
license = "LICENSE"

[tool.poetry.dependencies]
python = "^3.9"
tqdm = "^4.65.0"
pandas = "^2.2.3"
PyYAML = "^6.0.2"
pyarrow = "^18.0.0"
pillow = "^11.0.0"
numpy = "1.23.5"
opencv-python-headless = "^4.10.0.84"
scikit-learn = "^1.6.0"
open3d = "^0.19.0"
addict = "^2.4.0"
matplotlib = "^3.6.0"
click = "^8.1.8"
tensorboard = "^2.18.0"

[tool.poetry.group.dev.dependencies]
black = "^24.10.0"
pylint = "^3.3.1"
ipykernel = "^6.29.5"

[tool.poetry.group.docs.dependencies]
sphinx = "^8.1.3"
sphinx-rtd-theme = "^3.0.2"

[tool.poetry.group.test.dependencies]
pytest = "^8.0.0"

[tool.poetry.scripts]
dm_evaluate = "detectionmetrics.cli.evaluate:evaluate"
dm_batch = "detectionmetrics.cli.batch:batch"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"