mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-11 10:34:29 +08:00
Fix misc warnings (#1894)
This commit is contained in:
parent
28532c583f
commit
82c0c5545b
@ -77,7 +77,7 @@ class Blender(DataParser):
|
||||
poses.append(np.array(frame["transform_matrix"]))
|
||||
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]
|
||||
camera_angle_x = float(meta["camera_angle_x"])
|
||||
focal_length = 0.5 * image_width / np.tan(0.5 * camera_angle_x)
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
|
||||
from typing import Literal, Optional
|
||||
|
||||
import matplotlib
|
||||
import torch
|
||||
from matplotlib import cm
|
||||
from torchtyping import TensorType
|
||||
|
||||
from nerfstudio.utils import colors
|
||||
@ -88,7 +88,7 @@ def apply_float_colormap(
|
||||
if colormap == "default":
|
||||
colormap = "turbo"
|
||||
|
||||
colormap = cm.get_cmap(colormap)
|
||||
colormap = matplotlib.colormaps[colormap]
|
||||
colormap = torch.tensor(colormap.colors).to(image.device) # type: ignore
|
||||
image = torch.nan_to_num(image, 0)
|
||||
image_long = (image * 255).long()
|
||||
|
||||
@ -46,7 +46,7 @@ dependencies = [
|
||||
"requests",
|
||||
"rich>=12.5.1",
|
||||
"scikit-image>=0.19.3",
|
||||
"tensorboard==2.9.0",
|
||||
"tensorboard>=2.13.0",
|
||||
"torch>=1.12.1,<2.0.0",
|
||||
"torchmetrics[image]>=0.9.3",
|
||||
"torchtyping>=0.1.4",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user