mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
Fix the multiple points case for sam. (#998)
This commit is contained in:
@ -171,8 +171,8 @@ impl Sam {
|
||||
[x, y]
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
let points = Tensor::from_vec(xys, (n_points, 1, 2), img_embeddings.device())?;
|
||||
let labels = Tensor::ones((n_points, 1), DType::F32, img_embeddings.device())?;
|
||||
let points = Tensor::from_vec(xys, (1, n_points, 2), img_embeddings.device())?;
|
||||
let labels = Tensor::ones((1, n_points), DType::F32, img_embeddings.device())?;
|
||||
Some((points, labels))
|
||||
};
|
||||
let points = points.as_ref().map(|(x, y)| (x, y));
|
||||
|
Reference in New Issue
Block a user