diff --git a/examples/image_classification/load_datasets.ipynb b/examples/image_classification/load_datasets.ipynb deleted file mode 100644 index 78738570..00000000 --- a/examples/image_classification/load_datasets.ipynb +++ /dev/null @@ -1,211 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "0ff37ce4-4f98-4b98-9fe4-0b943c9c8949", - "metadata": {}, - "outputs": [], - "source": [ - "from giskard_vision.image_classification.dataloaders.loaders import *" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "cd697b1c-ab0b-4f8e-8183-9e5fe09b39c6", - "metadata": {}, - "outputs": [], - "source": [ - "gcs = DataLoaderGeirhosConflictStimuli()" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "ca0a76d9-20c0-41bc-a194-a3817ed85d81", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/inoki/.virtualenvs/giskard-vision/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", - " from .autonotebook import tqdm as notebook_tqdm\n" - ] - } - ], - "source": [ - "sc = DataLoaderSkinCancerHuggingFaceDataset()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "4f55117c-5641-4b36-be15-613228caa025", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-07-23 12:13:33.681629: W tensorflow/core/kernels/data/cache_dataset_ops.cc:858] The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to `dataset.cache().take(k).repeat()`. You should use `dataset.take(k).cache().repeat()` instead.\n" - ] - }, - { - "data": { - "text/plain": [ - "(224, 224, 3)" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "gcs.get_image(0).shape" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "2108d5be-5bd4-45dd-a7b9-54c7128f279a", - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "2024-07-23 12:13:33.714646: W tensorflow/core/kernels/data/cache_dataset_ops.cc:858] The calling iterator did not fully read the dataset being cached. In order to avoid unexpected truncation of the dataset, the partially cached contents of the dataset will be discarded. This can happen if you have an input pipeline similar to `dataset.cache().take(k).repeat()`. You should use `dataset.take(k).cache().repeat()` instead.\n" - ] - }, - { - "data": { - "text/plain": [ - "array(['clock'], dtype=' is available for this model. Using slow image processor class. To use the fast image processor class set `use_fast=True`.\n" - ] - } - ], - "source": [ - "m1 = SkinCancerHuggingFaceModel()" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "a2a21164-cbdb-4f19-8106-3762dc037501", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array([1.83466705e-03, 1.25676964e-03, 9.79788959e-01, 7.34477013e-04,\n", - " 1.28028123e-03, 1.40569434e-02, 1.04791753e-03])" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "m1.predict_probas(sc.get_image(0))" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "e7905124-ed98-4518-b1a5-c94eb419b44f", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array(['actinic_keratoses'], dtype='