Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion monai/data/box_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,8 @@ def non_max_suppression(
scores_t, *_ = convert_to_dst_type(scores, boxes_t)

# sort boxes in descending order according to the scores
sort_idxs = torch.argsort(scores_t, dim=0, descending=True)
# use stable=True to ensure deterministic ordering when scores are equal
sort_idxs = torch.argsort(scores_t, dim=0, descending=True, stable=True)
boxes_sort = deepcopy(boxes_t)[sort_idxs, :]

# initialize the list of picked indexes
Expand Down
2 changes: 1 addition & 1 deletion monai/networks/blocks/patchembedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def __init__(
chars = (("h", "p1"), ("w", "p2"), ("d", "p3"))[:spatial_dims]
from_chars = "b c " + " ".join(f"({k} {v})" for k, v in chars)
to_chars = f"b ({' '.join([c[0] for c in chars])}) ({' '.join([c[1] for c in chars])} c)"
axes_len = {f"p{i+1}": p for i, p in enumerate(patch_size)}
axes_len = {f"p{i + 1}": p for i, p in enumerate(patch_size)}
self.patch_embeddings = nn.Sequential(
Rearrange(f"{from_chars} -> {to_chars}", **axes_len), nn.Linear(self.patch_dim, hidden_size)
)
Expand Down
2 changes: 1 addition & 1 deletion runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function print_version {

function install_deps {
echo "Pip installing MONAI development dependencies and compile MONAI cpp extensions..."
${cmdPrefix}"${PY_EXE}" -m pip install -r requirements-dev.txt
${cmdPrefix}"${PY_EXE}" -m pip install --no-build-isolation -r requirements-dev.txt
}

function compile_cpp {
Expand Down