Skip to content

Commit

Permalink
BUG SQUASHED
Browse files Browse the repository at this point in the history
  • Loading branch information
Spritan committed Mar 1, 2024
1 parent 6468dbd commit 446a214
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 16 deletions.
2 changes: 1 addition & 1 deletion YOLOv8_Explainer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class yolov8_heatmap:
Args:
weight (str): The path to the checkpoint file.
device (str): The device to use for inference. Defaults to "cuda:0" if a GPU is available, otherwise "cpu".
method (str): The method to use for computing the CAM. Defaults to "EigenCAM".
method (str): The method to use for computing the CAM. Defaults to "EigenGradCAM".
layer (list): The indices of the layers to use for computing the CAM. Defaults to [10, 12, 14, 16, 18, -3].
conf_threshold (float): The confidence threshold for detections. Defaults to 0.2.
ratio (float): The ratio of maximum scores to return. Defaults to 0.02.
Expand Down
4 changes: 2 additions & 2 deletions YOLOv8_Explainer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def letterbox(
scaleFill=False,
scaleup=True,
stride=32,
) -> tuple[np.ndarray, tuple, tuple]:
):
"""
Resize and pad image while meeting stride-multiple constraints.
Expand Down Expand Up @@ -64,7 +64,7 @@ def letterbox(

return im, ratio, (dw, dh)

def display_images(images: list[Image.Image]) -> None:
def display_images(images):
"""
Display a list of PIL images in a grid.
Expand Down
101 changes: 89 additions & 12 deletions example.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="YOLOv8_Explainer",
version="0.0.04",
version="0.0.05",
description="Python packages that enable XAI methods for YOLOv8",
packages=find_packages(),
long_description=long_description,
Expand Down

0 comments on commit 446a214

Please sign in to comment.