Skip to content

Commit f44ba9d

Browse files
authored
Renaming classes (#57)
* cleanup and refactoring of examples * refactoring models and datasets * refactoring detectors * added pillow dep * added scikit-learn dep * added pandas dep
1 parent 10665a1 commit f44ba9d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+453
-4265
lines changed

examples/image_classification/load_datasets.ipynb

Lines changed: 0 additions & 211 deletions
This file was deleted.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"id": "9507a745-37b9-48ab-8ffe-68cc1de7bae7",
7+
"metadata": {},
8+
"outputs": [],
9+
"source": [
10+
"from giskard_vision.image_classification.dataloaders.loaders import DataLoaderSkinCancer"
11+
]
12+
},
13+
{
14+
"cell_type": "code",
15+
"execution_count": null,
16+
"id": "318972bd-635f-4be2-8b05-dcdfc74f4175",
17+
"metadata": {},
18+
"outputs": [],
19+
"source": [
20+
"sc = DataLoaderSkinCancer()"
21+
]
22+
},
23+
{
24+
"cell_type": "code",
25+
"execution_count": null,
26+
"id": "acda20b2-fbd2-440d-a1cf-065e1e1056ba",
27+
"metadata": {},
28+
"outputs": [],
29+
"source": [
30+
"from giskard_vision.image_classification.models.wrappers import *"
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": null,
36+
"id": "c1254d8c-33f1-4658-b9bd-a01230c4506e",
37+
"metadata": {},
38+
"outputs": [],
39+
"source": [
40+
"m1 = SkinCancerHFModel()"
41+
]
42+
},
43+
{
44+
"cell_type": "code",
45+
"execution_count": null,
46+
"id": "a2a21164-cbdb-4f19-8106-3762dc037501",
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"m1.predict_probas(sc.get_image(0))"
51+
]
52+
},
53+
{
54+
"cell_type": "code",
55+
"execution_count": null,
56+
"id": "e7905124-ed98-4518-b1a5-c94eb419b44f",
57+
"metadata": {},
58+
"outputs": [],
59+
"source": [
60+
"m1.predict_image(sc.get_image(0))"
61+
]
62+
},
63+
{
64+
"cell_type": "code",
65+
"execution_count": null,
66+
"id": "784e3266-b1b9-447d-accf-c655f110989c",
67+
"metadata": {},
68+
"outputs": [],
69+
"source": [
70+
"m1.predict(sc)"
71+
]
72+
},
73+
{
74+
"cell_type": "code",
75+
"execution_count": null,
76+
"id": "0fcf57af-08b4-4d83-922d-cebabeb420ee",
77+
"metadata": {},
78+
"outputs": [],
79+
"source": [
80+
"m2 = MicrosoftResNetImageNet50HFModel()"
81+
]
82+
},
83+
{
84+
"cell_type": "code",
85+
"execution_count": null,
86+
"id": "978875f0-1598-463f-a0f6-8e4859e9b69f",
87+
"metadata": {},
88+
"outputs": [],
89+
"source": [
90+
"m2.predict_probas(sc.get_image(0))"
91+
]
92+
},
93+
{
94+
"cell_type": "code",
95+
"execution_count": null,
96+
"id": "5cd590cc-e56e-4027-beea-545725e5a66b",
97+
"metadata": {},
98+
"outputs": [],
99+
"source": [
100+
"m2.predict_image(sc.get_image(0))"
101+
]
102+
},
103+
{
104+
"cell_type": "code",
105+
"execution_count": null,
106+
"id": "10dcebb6-10fe-4c24-8fd1-ca44549da624",
107+
"metadata": {},
108+
"outputs": [],
109+
"source": [
110+
"m3 = Jsli96ResNetImageNetHFModel()"
111+
]
112+
},
113+
{
114+
"cell_type": "code",
115+
"execution_count": null,
116+
"id": "902ac845-2cfe-4f03-9d09-6997f1a32d49",
117+
"metadata": {},
118+
"outputs": [],
119+
"source": [
120+
"m2.predict_probas(sc.get_image(0))"
121+
]
122+
}
123+
],
124+
"metadata": {
125+
"kernelspec": {
126+
"display_name": "Python 3 (ipykernel)",
127+
"language": "python",
128+
"name": "python3"
129+
},
130+
"language_info": {
131+
"codemirror_mode": {
132+
"name": "ipython",
133+
"version": 3
134+
},
135+
"file_extension": ".py",
136+
"mimetype": "text/x-python",
137+
"name": "python",
138+
"nbconvert_exporter": "python",
139+
"pygments_lexer": "ipython3",
140+
"version": "3.10.13"
141+
}
142+
},
143+
"nbformat": 4,
144+
"nbformat_minor": 5
145+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "code",
5+
"execution_count": null,
6+
"metadata": {},
7+
"outputs": [],
8+
"source": [
9+
"from giskard_vision.image_classification.models.wrappers import SkinCancerHFModel\n",
10+
"from giskard_vision.image_classification.dataloaders.loaders import DataLoaderSkinCancer\n",
11+
"from giskard_vision import scan\n",
12+
"\n",
13+
"model = SkinCancerHFModel()\n",
14+
"dataset = DataLoaderSkinCancer()\n",
15+
"\n",
16+
"results = scan(model=model, dataset=dataset, raise_exceptions=True)"
17+
]
18+
}
19+
],
20+
"metadata": {
21+
"kernelspec": {
22+
"display_name": ".venv",
23+
"language": "python",
24+
"name": "python3"
25+
},
26+
"language_info": {
27+
"codemirror_mode": {
28+
"name": "ipython",
29+
"version": 3
30+
},
31+
"file_extension": ".py",
32+
"mimetype": "text/x-python",
33+
"name": "python",
34+
"nbconvert_exporter": "python",
35+
"pygments_lexer": "ipython3",
36+
"version": "3.10.13"
37+
}
38+
},
39+
"nbformat": 4,
40+
"nbformat_minor": 2
41+
}

0 commit comments

Comments
 (0)