Skip to content

Fix detectron2 installation and skimage deprecated functions #287

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if [[ "${OPENDR_DEVICE}" == "gpu" ]]; then
echo "[INFO] Replacing torch==1.9.0+cu111 to enable CUDA acceleration."
pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
echo "[INFO] Reinstalling detectronv2."
pip3 install 'git+https://github.com/facebookresearch/detectron2.git'
pip3 install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'
fi

make libopendr
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ pip install mxnet-cu112==1.8.0post0
pip install opendr-toolkit-engine
pip install opendr-toolkit
```
If you encounter any issue installing the latest version of detectron, then you can try installing a previous commit:
```bash
pip install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'
```

## Installing only a *particular* tool using *pip* (CPU/GPU)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ torch>=1.0.0
torchvision
dominate>=2.3.1
dill
scikit-image
scikit-image>0.16.2
numpy>=1.15.4
scipy>=1.1.0
matplotlib>=2.2.2
Expand Down
2 changes: 1 addition & 1 deletion src/opendr/control/single_demo_grasp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ install_runtime_dependencies:

install_compilation_dependencies:
@+echo "#"; echo "# * Install Compilation Dependencies for single demonstration grasping *"; echo "#"
@+python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
@+python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'
@./install_single_demo_grasp.sh

help:
Expand Down
2 changes: 1 addition & 1 deletion src/opendr/control/single_demo_grasp/dependencies.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ python=torch==1.9.0

opendr=opendr-toolkit-engine

post-install=python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
post-install=python3 -m pip install 'git+https://github.com/facebookresearch/detectron2.git@5aeb252b194b93dc2879b4ac34bc51a31b5aee13'
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python=torch==1.9.0
llvmlite>=0.31.0
numba>=0.53.0
pyyaml>=5.3
scikit-image>=0.16.2
scikit-image>0.16.2
easydict>=1.9
linux=libboost-dev

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ python=torch==1.9.0
opencv-python==4.5.1.48
pillow>=8.3.2
trimesh==3.5.23
scikit-image>=0.16.2
scikit-image>0.16.2
matplotlib>=2.2.2

opendr=opendr-toolkit-engine
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def eval_func(points):

# Finally we do marching cubes
try:
verts, faces, normals, values = measure.marching_cubes_lewiner(sdf, 0.5)
verts, faces, normals, values = measure.marching_cubes(sdf, 0.5)
# transform verts into world coordinate system
verts = np.matmul(mat[:3, :3], verts.T) + mat[:3, 3:4]
verts = verts.T
Expand Down