-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from Giskard-AI/readme-image-classification-ob…
…ject-detection Add readme for image classification and object detection
- Loading branch information
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,11 +13,16 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- name: Remove dark theme logo from README | ||
run: sed -i 's/.*#gh-dark-mode-only.*//' README.md | ||
|
||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v3 | ||
with: | ||
python-version: "3.10" | ||
cache: false | ||
|
||
- name: Build dist | ||
run: pdm build | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# `image_classification` module | ||
|
||
This module contains model wrappers, dataloaders, tests and all the ingredients needed to evaluate your single-label image classification models. | ||
In particular this module allows you to evaluate your model against the following criteria: | ||
|
||
- Performance on images with different basic image attributes. | ||
- Performance on images with various metadata from the datasets. | ||
- Robustness against image perturbations like blurring, resizing, recoloring (performed by `opencv`: https://github.com/opencv/opencv) | ||
|
||
## Wrapped Datasets | ||
|
||
- [geirhos_conflict_stimuli](https://www.tensorflow.org/datasets/catalog/geirhos_conflict_stimuli) through Tensorflow Datasets | ||
- [CIFAR100](https://huggingface.co/datasets/uoft-cs/cifar100) through Hugging Face | ||
- [Skin cancer](https://huggingface.co/datasets/marmal88/skin_cancer) through Hugging Face | ||
|
||
|
||
## Scan and Supported Classification | ||
|
||
Once the model and dataloader (`dl`) are wrapped, you can scan the model with the scan API in Giskard vision core: | ||
|
||
```python | ||
from giskard_vision.core.scanner import scan | ||
|
||
results = scan(model, dl) | ||
``` | ||
|
||
It adapts the [scan API in Giskard Python library](https://github.com/Giskard-AI/giskard#2--scan-your-model-for-issues) to magically scan the vision model with the dataloader. | ||
|
||
Currently, due to the constraint of the scan API, we support a subset of image classification tasks: | ||
|
||
- [x] Multiclass and single label | ||
- [ ] Multiclass and multi-label | ||
|
||
We will be working to remove such limit for the scan. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# `object_detection` module | ||
|
||
This module contains model wrappers, dataloaders, tests and all the ingredients needed to evaluate your object detection models. | ||
In particular this module allows you to evaluate your model against the following criteria: | ||
|
||
- Performance on images with different basic image attributes. | ||
- Performance on images with various metadata from the datasets. | ||
- Robustness against image perturbations like blurring, resizing, recoloring (performed by `opencv`: https://github.com/opencv/opencv) | ||
|
||
## Wrapped Datasets | ||
|
||
- [Racoon](https://www.kaggle.com/datasets/debasisdotcom/racoon-detection/data) | ||
- [300W](https://ibug.doc.ic.ac.uk/resources/300-W/), using the boundary box around all face landmarks | ||
- [ffhq](https://github.com/DCGM/ffhq-features-dataset), using the boundary box around all face landmarks | ||
- [Living room passes](https://huggingface.co/datasets/Nfiniteai/living-room-passes) through Hugging Face | ||
|
||
## Scan and Metrics | ||
|
||
Once the model and dataloader (`dl`) are wrapped, you can scan the model with the scan API in Giskard vision core: | ||
|
||
```python | ||
from giskard_vision.core.scanner import scan | ||
|
||
results = scan(model, dl) | ||
``` | ||
|
||
It adapts the [scan API in Giskard Python library](https://github.com/Giskard-AI/giskard#2--scan-your-model-for-issues) to magically scan the vision model with the dataloader. The considered metric is: | ||
|
||
- [x] Intersection over Union (IoU) | ||
|
||
Currently, we only support one object both in the model prediction and ground truth, due to the constraint of the scan API. We will be working to remove such limit. |