Skip to content

Commit

Permalink
UPD: display only one image instead of two for slicing
Browse files Browse the repository at this point in the history
  • Loading branch information
bmalezieux committed Jan 23, 2024
1 parent ac9b268 commit a851683
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 2 additions & 0 deletions giskard_vision/landmark_detection/dataloaders/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,8 @@ class FilteredDataLoader(DataLoaderWrapper):
FilteredDataLoader: Filtered data loader instance.
"""

dataloader_type = "filter"

@property
def name(self):
"""
Expand Down
14 changes: 8 additions & 6 deletions giskard_vision/landmark_detection/detectors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ def get_results(self, model: Any, dataset: Any) -> Sequence[ScanResult]:
os.makedirs("examples_images", exist_ok=True)
filename_examples = []

filename_example_dataloader_ref = f"examples_images/{dataset.name}.png"
cv2.imwrite(
filename_example_dataloader_ref,
cv2.resize(dataset[0][0][0], (0, 0), fx=0.3, fy=0.3)
)
filename_examples.append(filename_example_dataloader_ref)
if dl.dataloader_type != "filter":

filename_example_dataloader_ref = f"examples_images/{dataset.name}.png"
cv2.imwrite(
filename_example_dataloader_ref,
cv2.resize(dataset[0][0][0], (0, 0), fx=0.3, fy=0.3)
)
filename_examples.append(filename_example_dataloader_ref)

filename_example_dataloader = f"examples_images/{dl.name}.png"
cv2.imwrite(
Expand Down

0 comments on commit a851683

Please sign in to comment.