Skip to content

Conversation

@bmalezieux
Copy link
Contributor

@bmalezieux bmalezieux commented Aug 14, 2024

Description

Related Issue

Type of Change

  • 📚 Examples / docs / tutorials / dependencies update
  • 🔧 Bug fix (non-breaking change which fixes an issue)
  • 🥂 Improvement (non-breaking change which improves an existing feature)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to change)
  • 🔐 Security fix

Checklist

  • I've read the CODE_OF_CONDUCT.md document.
  • I've read the CONTRIBUTING.md guide.
  • I've written tests for all new methods and classes that I created.
  • I've written the docstring in Google format for all the methods and classes that I used.
  • I've updated the pdm.lock running pdm update-lock (only applicable when pyproject.toml has been
    modified)

Copy link
Contributor

@rabah-khalek rabah-khalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would remove this sentence: "The giskard-vision library is under development. For now, only landmark detection models are available."

…ing two tutorial notebooks + updating class names
@bmalezieux bmalezieux marked this pull request as ready for review August 19, 2024 12:25
Copy link
Contributor

@rabah-khalek rabah-khalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments, but overall good.

I would also remove all the docstrings (like in dataloaders for instance, since you're already explaining the methods in the guide)

Returns:
np.ndarray: The image as numpy array (h, w, c)
"""
return self.images_paths[idx]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead:

cv2.imread(str(self.images_paths[idx]))

Returns:
np.ndarray: The image as numpy array (h, w, c)
"""
return self.images_paths[idx]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead:

cv2.imread(str(self.images_paths[idx]))

Returns:
np.ndarray: The image as numpy array (h, w, c)
"""
return self.images_paths[idx]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead:

cv2.imread(str(self.images_paths[idx]))

Comment on lines 163 to 175
def get_label(self, idx: int) -> Optional[np.ndarray]:
"""
Gets the box coordinates (for a single image) for a specific index.
Format:
np.array({"boxes": [x1_min, y1_min, x1_max, y1_max]})
Args:
idx (int): Index of the image.
Returns:
Optional[np.ndarray]: Box coordinates for the given index.
"""
return np.array(..., dtype=object)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To scan your model, start by **wrapping your dataset** with `DataIteratorBase`. Your class should override:

- `idx_sampler` (property) that returns the array of indices to iterate over
- `get_image` that loads the image corresponding to the right index as a `np.ndarray`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be adjusted: a dict containing boxes (np.array) and labels (string) as keys

@Hartorn Hartorn merged commit 9ae9608 into main Aug 19, 2024
@Hartorn Hartorn deleted the doc-vision-update branch August 19, 2024 14:43
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants