mirror of
https://github.com/modelscope/modelscope.git
synced 2026-07-13 13:59:40 +02:00
fix py38 issue
Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12660340
This commit is contained in:
@@ -169,7 +169,7 @@ def plot_result(res_path,
|
||||
check_point_in_img(corners_img, img.shape[0], img.shape[1]))
|
||||
valid = valid.reshape(
|
||||
-1, 8) # valid means: d>0 and visible in current view
|
||||
corners_img = corners_img.reshape(-1, 8, 2).astype(np.int)
|
||||
corners_img = corners_img.reshape(-1, 8, 2).astype(int)
|
||||
for aid in range(valid.shape[0]):
|
||||
if scores[aid] < vis_thred and pred_flag[aid]:
|
||||
continue
|
||||
|
||||
@@ -30,7 +30,7 @@ class ImageDetectionPipeline(Pipeline):
|
||||
def preprocess(self, input: Input) -> Dict[str, Any]:
|
||||
|
||||
img = LoadImage.convert_to_ndarray(input)
|
||||
img = img.astype(np.float)
|
||||
img = img.astype(np.float64)
|
||||
img = self.model.preprocess(img)
|
||||
result = {'img': img}
|
||||
return result
|
||||
|
||||
@@ -225,7 +225,7 @@ class ReferringVideoObjectSegmentationPipeline(Pipeline):
|
||||
def apply_mask(image, mask, color, transparency=0.7):
|
||||
mask = mask[..., np.newaxis].repeat(repeats=3, axis=2)
|
||||
mask = mask * transparency
|
||||
color_matrix = np.ones(image.shape, dtype=np.float) * color
|
||||
color_matrix = np.ones(image.shape, dtype=np.float64) * color
|
||||
out_image = color_matrix * mask + image * (1.0 - mask)
|
||||
return out_image
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
hyperpyyaml
|
||||
librosa<=0.9.2
|
||||
librosa==0.9.2
|
||||
MinDAEC
|
||||
mir_eval>=0.7
|
||||
numpy
|
||||
|
||||
@@ -3,7 +3,7 @@ greenlet>=1.1.2
|
||||
inflect
|
||||
jedi>=0.18.1
|
||||
kantts
|
||||
librosa<=0.9.2
|
||||
librosa==0.9.2
|
||||
lxml
|
||||
matplotlib
|
||||
msgpack>=1.0.4
|
||||
|
||||
@@ -6,7 +6,7 @@ chumpy
|
||||
clip>=1.0
|
||||
control_ldm
|
||||
ddpm_guided_diffusion
|
||||
diffusers
|
||||
diffusers>=0.13.1,<0.15.0
|
||||
easydict
|
||||
easyrobust
|
||||
edit_distance
|
||||
|
||||
@@ -4,7 +4,8 @@ datasets>=2.7.0,<=2.8.0
|
||||
einops
|
||||
filelock>=3.3.0
|
||||
gast>=0.2.2
|
||||
numpy<1.24.0
|
||||
# for python3.7 python3.8 compatible
|
||||
numpy<1.22.0
|
||||
oss2
|
||||
# for datasets compatible
|
||||
pandas<=1.5.3
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
accelerate
|
||||
diffusers>=0.13.1,<0.15.0
|
||||
ftfy>=6.0.3
|
||||
librosa<=0.9.2
|
||||
librosa==0.9.2
|
||||
opencv-python
|
||||
pycocoevalcap>=1.2
|
||||
pycocotools>=2.0.4
|
||||
|
||||
@@ -87,3 +87,9 @@ envs:
|
||||
- test_image_style_transfer.py
|
||||
- test_image_portrait_stylization_trainer.py
|
||||
- test_language_identification.py
|
||||
- test_ocr_detection_db_trainer.py
|
||||
- test_nerf_recon_acc.py
|
||||
- test_tensorboard_hook.py
|
||||
- test_efficient_diffusion_tuning_trainer.py
|
||||
- test_trainer.py
|
||||
- test_nerf_recon_acc_trainer.py
|
||||
|
||||
Reference in New Issue
Block a user