Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: test_images",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/tools/test_images.py",
"console": "integratedTerminal",
"args": [
"--gpu=0", "--imgdir=data/demo/", "--meta=data/demo/meta.yml", "--color=*color.png",
"--network=posecnn", "--pretrained=data/checkpoints/ycb_object/vgg16_ycb_object_self_supervision_epoch_8.checkpoint.pth",
"--dataset=ycb_object_test", "--cfg=experiments/cfgs/ycb_object.yml"
],
"env": {
"PYTHONUNBUFFERED":"True",
"CUDA_VISIBLE_DEVICES":"0"
}
}
]
}
24 changes: 24 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pyassimp = "==4.1.3"
progressbar2 = "*"
opencv-python = "==4.2.0.34"
transforms3d = "*"
ipython = "*"
matplotlib = "*"
easydict = "*"
future = "*"
scipy = "*"
PyOpenGL = ">=3.1.0"
Pillow = "*"
PyYAML = "*"
Cython = "*"

[dev-packages]

[requires]
python_version = "3.8"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ Use python3. If ROS is needed, compile with python2.
1. Install [PyTorch](https://pytorch.org/)

2. Install Eigen from the Github source code [here](https://github.com/eigenteam/eigen-git-mirror)
- I installed not from github but using command 'sudo apt install libeigen3-dev'. This resulted in package getting installed at '/usr/include/eigen3' instead of '/usr/local/eigen3'. So I had to change the include_dirs value in $ROOT/lib/layers/setup.py accordingly.
- For newbies, I found the path of eigen3 on my system using 'dpkg -L libeigen3-dev' command.

3. Install Sophus from the Github source code [here](https://github.com/yuxng/Sophus)
- I followed this link 'https://chowdera.com/2021/06/20210602213411499x.html' to help with installing from github. This does install the package into '/usr/local/sophus', so I kept the second value for include_dirs in the $ROOT/lib/layers/setup.py file as is.
- Also, when trying to run the above setup.py file (as instructions below suggested), I got an error failing to include fmt/core.h. So I ended up installing fmt as well from Github (luckily the web link above actually has instructions for that too). And this is probably the reason $ROOT/lib/layers/setup.py uses '/usr/local/include' instead of '/usr/local/include/sophus'.

4. Install python packages
```Shell
Expand Down
5 changes: 3 additions & 2 deletions lib/fcn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ def _merge_a_into_b(a, b):
def cfg_from_file(filename):
"""Load a config file and merge it into the default options."""
import yaml

with open(filename, 'r') as f:
yaml_cfg = edict(yaml.load(f))
yaml_cfg = edict(yaml.load(f, Loader=yaml.FullLoader))

_merge_a_into_b(yaml_cfg, __C)

Expand All @@ -383,5 +384,5 @@ def yaml_from_file(filename):
"""Load a config file and merge it into the default options."""
import yaml
with open(filename, 'r') as f:
yaml_cfg = edict(yaml.load(f))
yaml_cfg = edict(yaml.load(f, Loader=yaml.FullLoader))
return yaml_cfg
2 changes: 1 addition & 1 deletion lib/layers/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'roi_pooling_kernel.cu',
'ROIAlign_cuda.cu',
'point_matching_loss_kernel.cu'],
include_dirs = ['/usr/local/include/eigen3', '/usr/local/include'])
include_dirs = ['/usr/include/eigen3', '/usr/local/include'])
],
cmdclass={
'build_ext': BuildExtension
Expand Down