Skip to content

Commit

Permalink
Merge pull request #269 from yuedongli1/master
Browse files Browse the repository at this point in the history
fix np.int
  • Loading branch information
CaitinZhao committed Feb 22, 2024
2 parents 9169078 + 0e6a0fd commit 8228636
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mindyolo/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __init__(
elif mini > 1:
shapes[i] = [1, 1 / mini]

self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(np.int) * stride
self.batch_shapes = np.ceil(np.array(shapes) * img_size / stride + pad).astype(np.int_) * stride

self.imgIds = [int(Path(im_file).stem) for im_file in self.img_files]

Expand Down Expand Up @@ -786,7 +786,7 @@ def pastein(self, sample, num_sample=30):
r_image = cv2.resize(sample_images[sel_ind], (r_w, r_h))
temp_crop = image[ymin: ymin + r_h, xmin: xmin + r_w]
m_ind = r_mask > 0
if m_ind.astype(np.int).sum() > 60:
if m_ind.astype(np.int_).sum() > 60:
temp_crop[m_ind] = r_image[m_ind]
box = np.array([xmin, ymin, xmin + r_w, ymin + r_h], dtype=np.float32)
if len(bboxes):
Expand Down

0 comments on commit 8228636

Please sign in to comment.