Skip to content

Commit 9f85799

Browse files
authored
Merge pull request #56 from Giskard-AI/readme-image-classification-object-detection
Add readme for image classification and object detection
2 parents 6287112 + 9acb2c7 commit 9f85799

File tree

5 files changed

+83
-2
lines changed

5 files changed

+83
-2
lines changed

‎.github/workflows/do-release.yml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,16 @@ jobs:
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v4.1.0
16+
17+
- name: Remove dark theme logo from README
18+
run: sed -i 's/.*#gh-dark-mode-only.*//' README.md
19+
1620
- name: Setup PDM
1721
uses: pdm-project/setup-pdm@v3
1822
with:
1923
python-version: "3.10"
2024
cache: false
25+
2126
- name: Build dist
2227
run: pdm build
2328

‎README.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
## Supported computer vision tasks
2828

2929
- **Facial Landmark Detection** ([Readme](https://github.com/Giskard-AI/giskard-vision/blob/main/giskard_vision/landmark_detection/Readme.md))
30-
- **Image Classification** 🔜 Coming soon!
30+
- **Image Classification** ([Readme](https://github.com/Giskard-AI/giskard-vision/blob/main/giskard_vision/image_classification/Readme.md))
31+
- **Object Detection** ([Readme](https://github.com/Giskard-AI/giskard-vision/blob/main/giskard_vision/object_detection/Readme.md))
3132

3233
## Install
3334

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# `image_classification` module
2+
3+
This module contains model wrappers, dataloaders, tests and all the ingredients needed to evaluate your single-label image classification models.
4+
In particular this module allows you to evaluate your model against the following criteria:
5+
6+
- Performance on images with different basic image attributes.
7+
- Performance on images with various metadata from the datasets.
8+
- Robustness against image perturbations like blurring, resizing, recoloring (performed by `opencv`: https://github.com/opencv/opencv)
9+
10+
## Wrapped Datasets
11+
12+
- [geirhos_conflict_stimuli](https://www.tensorflow.org/datasets/catalog/geirhos_conflict_stimuli) through Tensorflow Datasets
13+
- [CIFAR100](https://huggingface.co/datasets/uoft-cs/cifar100) through Hugging Face
14+
- [Skin cancer](https://huggingface.co/datasets/marmal88/skin_cancer) through Hugging Face
15+
16+
17+
## Scan and Supported Classification
18+
19+
Once the model and dataloader (`dl`) are wrapped, you can scan the model with the scan API in Giskard vision core:
20+
21+
```python
22+
from giskard_vision.core.scanner import scan
23+
24+
results = scan(model, dl)
25+
```
26+
27+
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.
28+
29+
Currently, due to the constraint of the scan API, we support a subset of image classification tasks:
30+
31+
- [x] Multiclass and single label
32+
- [ ] Multiclass and multi-label
33+
34+
We will be working to remove such limit for the scan.

‎giskard_vision/landmark_detection/Readme.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,17 @@ You can also check our publicly hosted versions of these datasets on S3:
2222
- https://poc-face-aligment.s3.eu-north-1.amazonaws.com/300W/300w.zip.004
2323
- FFHQ (only meta data): https://poc-face-aligment.s3.eu-north-1.amazonaws.com/ffhq/json.zip
2424

25-
## Metrics
25+
## Scan and Metrics
26+
27+
Once the model and dataloader (`dl`) are wrapped, you can scan the model with the scan API in Giskard vision core:
28+
29+
```python
30+
from giskard_vision.core.scanner import scan
31+
32+
results = scan(model, dl)
33+
```
34+
35+
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 metrics are:
2636

2737
- [x] ME: Mean Euclidean distances
2838
- [x] NME: Normalised Mean Euclidean distances
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# `object_detection` module
2+
3+
This module contains model wrappers, dataloaders, tests and all the ingredients needed to evaluate your object detection models.
4+
In particular this module allows you to evaluate your model against the following criteria:
5+
6+
- Performance on images with different basic image attributes.
7+
- Performance on images with various metadata from the datasets.
8+
- Robustness against image perturbations like blurring, resizing, recoloring (performed by `opencv`: https://github.com/opencv/opencv)
9+
10+
## Wrapped Datasets
11+
12+
- [Racoon](https://www.kaggle.com/datasets/debasisdotcom/racoon-detection/data)
13+
- [300W](https://ibug.doc.ic.ac.uk/resources/300-W/), using the boundary box around all face landmarks
14+
- [ffhq](https://github.com/DCGM/ffhq-features-dataset), using the boundary box around all face landmarks
15+
- [Living room passes](https://huggingface.co/datasets/Nfiniteai/living-room-passes) through Hugging Face
16+
17+
## Scan and Metrics
18+
19+
Once the model and dataloader (`dl`) are wrapped, you can scan the model with the scan API in Giskard vision core:
20+
21+
```python
22+
from giskard_vision.core.scanner import scan
23+
24+
results = scan(model, dl)
25+
```
26+
27+
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:
28+
29+
- [x] Intersection over Union (IoU)
30+
31+
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.

0 commit comments

Comments
 (0)