Skip to content

Commit

Permalink
Fix typo: get_connected_componnets -> get_connected_components
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhavir committed Aug 21, 2024
1 parent 7e1596c commit fb2c826
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions sam2/csrc/connected_components.cu
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ __global__ void final_counting(

} // namespace cc2d

std::vector<torch::Tensor> get_connected_componnets(
std::vector<torch::Tensor> get_connected_components(
const torch::Tensor& inputs) {
AT_ASSERTM(inputs.is_cuda(), "inputs must be a CUDA tensor");
AT_ASSERTM(inputs.ndimension() == 4, "inputs must be [N, 1, H, W] shape");
Expand Down Expand Up @@ -283,7 +283,7 @@ std::vector<torch::Tensor> get_connected_componnets(

PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {
m.def(
"get_connected_componnets",
&get_connected_componnets,
"get_connected_componnets");
"get_connected_components",
&get_connected_components,
"get_connected_components");
}
2 changes: 1 addition & 1 deletion sam2/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_connected_components(mask):
"""
from sam2 import _C

return _C.get_connected_componnets(mask.to(torch.uint8).contiguous())
return _C.get_connected_components(mask.to(torch.uint8).contiguous())


def mask_to_box(masks: torch.Tensor):
Expand Down

0 comments on commit fb2c826

Please sign in to comment.