From de782a5a9e25075c9939c5743072ffaff9aeff49 Mon Sep 17 00:00:00 2001 From: "mulin.lyh" Date: Mon, 15 Jul 2024 16:28:40 +0800 Subject: [PATCH] fix matplotlib.cm compatible issue --- modelscope/models/cv/video_depth_estimation/utils/depth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modelscope/models/cv/video_depth_estimation/utils/depth.py b/modelscope/models/cv/video_depth_estimation/utils/depth.py index 5fbf6aa6..2fc16a01 100644 --- a/modelscope/models/cv/video_depth_estimation/utils/depth.py +++ b/modelscope/models/cv/video_depth_estimation/utils/depth.py @@ -3,7 +3,9 @@ import numpy as np import torch import torchvision.transforms as transforms -from matplotlib.cm import get_cmap +# from matplotlib.cm import get_cmap +# compatible with matplotlib 3.9.0 +from matplotlib.pyplot import get_cmap from modelscope.models.cv.video_depth_estimation.utils.image import ( flip_lr, gradient_x, gradient_y, interpolate_image, load_image)