Fix misc warnings (#1894)

This commit is contained in:
Matthew Tancik authored and GitHub committed 2023-05-09 14:11:28 -07:00
1 parent 28532c583f
commit 82c0c5545b
3 files changed
+4 -4

No files matched your search

@@ -77,7 +77,7 @@ class Blender(DataParser):
poses.append(np.array(frame["transform_matrix"])) poses.append(np.array(frame["transform_matrix"]))
poses = np.array(poses).astype(np.float32) poses = np.array(poses).astype(np.float32)
img_0 = imageio.imread(image_filenames[0]) img_0 = imageio.v2.imread(image_filenames[0])
image_height, image_width = img_0.shape[:2] image_height, image_width = img_0.shape[:2]
camera_angle_x = float(meta["camera_angle_x"]) camera_angle_x = float(meta["camera_angle_x"])
focal_length = 0.5 * image_width / np.tan(0.5 * camera_angle_x) focal_length = 0.5 * image_width / np.tan(0.5 * camera_angle_x)
+2 -2
View File
@@ -16,8 +16,8 @@
from typing import Literal, Optional from typing import Literal, Optional
import matplotlib
import torch import torch
from matplotlib import cm
from torchtyping import TensorType from torchtyping import TensorType
from nerfstudio.utils import colors from nerfstudio.utils import colors
@@ -88,7 +88,7 @@ def apply_float_colormap(
if colormap == "default": if colormap == "default":
colormap = "turbo" colormap = "turbo"
colormap = cm.get_cmap(colormap) colormap = matplotlib.colormaps[colormap]
colormap = torch.tensor(colormap.colors).to(image.device) # type: ignore colormap = torch.tensor(colormap.colors).to(image.device) # type: ignore
image = torch.nan_to_num(image, 0) image = torch.nan_to_num(image, 0)
image_long = (image * 255).long() image_long = (image * 255).long()
+1 -1
View File
@@ -46,7 +46,7 @@ dependencies = [
"requests", "requests",
"rich>=12.5.1", "rich>=12.5.1",
"scikit-image>=0.19.3", "scikit-image>=0.19.3",
"tensorboard==2.9.0", "tensorboard>=2.13.0",
"torch>=1.12.1,<2.0.0", "torch>=1.12.1,<2.0.0",
"torchmetrics[image]>=0.9.3", "torchmetrics[image]>=0.9.3",
"torchtyping>=0.1.4", "torchtyping>=0.1.4",