Skip to content
Open
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
13 changes: 12 additions & 1 deletion +sleap/+model/+topdown/+internal/Postprocess1CustomLayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,17 @@
crops = zeros(layer.BboxSize(1), layer.BboxSize(2), 1, size(Z1, 4), 'like',inputIm);

n=1;

% % Reshape peaks for indexing
% x = reshape(Z1(1, 1, 1, 1:n), [1, 1, 1, n]);
% y = reshape(Z1(1, 1, 2, 1:n), [1, 1, 1, n]);
%
% % Create reference object for cropping
% R = imref2d(layer.BboxSize, [x - layer.BboxSize(1)/2, x + layer.BboxSize(1)/2], [y - layer.BboxSize(2)/2, y + layer.BboxSize(2)/2]);
%
% % Perform cropping using indexing
% crops(:,:,1,1:n) = imwarp(inputIm, affine2d(), 'OutputView', R);

for i = 1:size(inputIm,4)
for j = 1:numAnimalsPerImage(1,1,1,i)
x = Z1(1,1,1,n);
Expand Down Expand Up @@ -228,4 +239,4 @@
end

end
end
end
Binary file modified demo.mlx
Binary file not shown.