New YOLOv8 Results() class for prediction outputs (#314)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: Laughing-q <1185102784@qq.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
Co-authored-by: Viet Nhat Thai <60825385+vietnhatthai@users.noreply.github.com>
Co-authored-by: Paula Derrenger <107626595+pderrenger@users.noreply.github.com>
This commit is contained in:
Ayush Chaurasia 2023-01-17 19:02:34 +05:30 committed by GitHub
parent 0cb87f7dd3
commit c6985da9de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 813 additions and 259 deletions

View file

@ -27,12 +27,12 @@ class BaseModel(nn.Module):
Wrapper for `_forward_once` method.
Args:
x (torch.tensor): The input image tensor
x (torch.Tensor): The input image tensor
profile (bool): Whether to profile the model, defaults to False
visualize (bool): Whether to return the intermediate feature maps, defaults to False
Returns:
(torch.tensor): The output of the network.
(torch.Tensor): The output of the network.
"""
return self._forward_once(x, profile, visualize)
@ -41,12 +41,12 @@ class BaseModel(nn.Module):
Perform a forward pass through the network.
Args:
x (torch.tensor): The input tensor to the model
x (torch.Tensor): The input tensor to the model
profile (bool): Print the computation time of each layer if True, defaults to False.
visualize (bool): Save the feature maps of the model if True, defaults to False
Returns:
(torch.tensor): The last output of the model.
(torch.Tensor): The last output of the model.
"""
y, dt = [], [] # outputs
for m in self.model: