This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import math | |
| import numpy as np | |
| import cv2 | |
| import torch | |
| from plyfile import PlyData, PlyElement | |
| from pytorch3d.transforms import euler_angles_to_matrix | |
| from pytorch3d.renderer import FoVPerspectiveCameras | |
| # Copied from omnidata, which is badly named, the function returns what is actually world_to_camera |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # docker build -t zach/cuda_conda:cu118-torch21 . --network host | |
| # sudo docker run --gpus all -it --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 --user root -v /mnt/:/mnt/ -v ~/workspace/:~/workspace/ --network host zach/cuda_conda:cu118-torch21 | |
| FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 | |
| # Add some dependencies | |
| RUN sed -i 's#http://archive.ubuntu.com/#http://mirrors.tuna.tsinghua.edu.cn/#' /etc/apt/sources.list |