This file contains 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 numpy as np | |
import torch | |
import time | |
import imageio | |
import cv2 | |
from tqdm import tqdm | |
import torch.nn.functional as Fu | |
from pytorch3d.implicitron.tools.point_cloud_utils import get_rgbd_point_cloud | |
from pytorch3d.renderer import (AlphaCompositor, MultinomialRaysampler, | |
NDCMultinomialRaysampler, |
This file contains 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 pytorch_lightning as pl | |
class FFCVDataModule(pl.LightningDataModule): | |
def __init__(self, batch_size, train=None, reg = None, validation=None, test=None, predict=None, | |
wrap=False, num_workers=None, shuffle_test_loader=False, use_worker_init_fn=False, | |
shuffle_val_dataloader=False, beton_path=None, **kwargs): | |
super().__init__() | |
self.batch_size = batch_size | |
self.num_workers = num_workers if num_workers is not None else batch_size * 2 |
This file contains 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 numpy as np | |
import torch | |
import time | |
import imageio | |
import cv2 | |
from tqdm import tqdm | |
import torch.nn.functional as Fu | |
from pytorch3d.implicitron.tools.point_cloud_utils import get_rgbd_point_cloud | |
from pytorch3d.renderer import (AlphaCompositor, MultinomialRaysampler, | |
NDCMultinomialRaysampler, |
This file contains 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 cv2 | |
import argparse | |
import glob | |
from torchvision.io import write_video | |
import numpy as np | |
import os | |
""" | |
A quick piece of code I put together to join some video samples I had for creating visualizations. |