diff --git a/tutorial/P1_tutorial_Preprocessing.ipynb b/tutorial/P1_tutorial_Preprocessing.ipynb new file mode 100644 index 0000000..0a54edc --- /dev/null +++ b/tutorial/P1_tutorial_Preprocessing.ipynb @@ -0,0 +1,403 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "initial_id", + "metadata": { + "collapsed": true, + "ExecuteTime": { + "end_time": "2023-11-19T22:53:31.204470200Z", + "start_time": "2023-11-19T22:53:28.902688100Z" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Requirement already satisfied: drillvision in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (1.1.0)\n", + "Requirement already satisfied: requests==2.30.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (2.30.0)\n", + "Requirement already satisfied: bs4==0.0.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (0.0.1)\n", + "Requirement already satisfied: bing-image-downloader in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.1.2)\n", + "Requirement already satisfied: pillow==9.5.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (9.5.0)\n", + "Requirement already satisfied: pydantic~=1.10.7 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.10.12)\n", + "Requirement already satisfied: tqdm~=4.65.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (4.65.1)\n", + "Requirement already satisfied: matplotlib~=3.7.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (3.7.2)\n", + "Requirement already satisfied: tensorflow~=2.12.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (2.12.1)\n", + "Requirement already satisfied: numpy~=1.23.5 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.23.5)\n", + "Requirement already satisfied: keras~=2.12.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (2.12.0)\n", + "Requirement already satisfied: pandas~=2.0.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (2.0.3)\n", + "Requirement already satisfied: IPython~=8.13.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (8.13.2)\n", + "Requirement already satisfied: pytest~=7.3.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (7.3.1)\n", + "Requirement already satisfied: pathlib in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.0.1)\n", + "Requirement already satisfied: boto3~=1.26.137 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.26.165)\n", + "Requirement already satisfied: python-dotenv~=1.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.0.0)\n", + "Requirement already satisfied: seaborn~=0.11.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (0.11.2)\n", + "Requirement already satisfied: scikit-learn==1.2.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (1.2.2)\n", + "Requirement already satisfied: imageio==2.31.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (2.31.0)\n", + "Requirement already satisfied: opencv-python==4.8.0.74 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (4.8.0.74)\n", + "Requirement already satisfied: scikit-image==0.21.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from drillvision) (0.21.0)\n", + "Requirement already satisfied: beautifulsoup4 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from bs4==0.0.1->drillvision) (4.12.2)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from requests==2.30.0->drillvision) (3.2.0)\n", + "Requirement already satisfied: idna<4,>=2.5 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from requests==2.30.0->drillvision) (3.4)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from requests==2.30.0->drillvision) (1.26.16)\n", + "Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from requests==2.30.0->drillvision) (2023.7.22)\n", + "Requirement already satisfied: scipy>=1.8 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (1.11.1)\n", + "Requirement already satisfied: networkx>=2.8 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (3.1)\n", + "Requirement already satisfied: tifffile>=2022.8.12 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (2023.7.18)\n", + "Requirement already satisfied: PyWavelets>=1.1.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (1.4.1)\n", + "Requirement already satisfied: packaging>=21 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (23.1)\n", + "Requirement already satisfied: lazy_loader>=0.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-image==0.21.0->drillvision) (0.3)\n", + "Requirement already satisfied: joblib>=1.1.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-learn==1.2.2->drillvision) (1.3.1)\n", + "Requirement already satisfied: threadpoolctl>=2.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from scikit-learn==1.2.2->drillvision) (3.2.0)\n", + "Requirement already satisfied: botocore<1.30.0,>=1.29.165 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from boto3~=1.26.137->drillvision) (1.29.165)\n", + "Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from boto3~=1.26.137->drillvision) (1.0.1)\n", + "Requirement already satisfied: s3transfer<0.7.0,>=0.6.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from boto3~=1.26.137->drillvision) (0.6.1)\n", + "Requirement already satisfied: backcall in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.2.0)\n", + "Requirement already satisfied: decorator in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (5.1.1)\n", + "Requirement already satisfied: jedi>=0.16 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.19.0)\n", + "Requirement already satisfied: matplotlib-inline in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.1.6)\n", + "Requirement already satisfied: pickleshare in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.7.5)\n", + "Requirement already satisfied: prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (3.0.39)\n", + "Requirement already satisfied: pygments>=2.4.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (2.16.1)\n", + "Requirement already satisfied: stack-data in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.6.2)\n", + "Requirement already satisfied: traitlets>=5 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (5.9.0)\n", + "Requirement already satisfied: typing-extensions in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (4.5.0)\n", + "Requirement already satisfied: colorama in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from IPython~=8.13.2->drillvision) (0.4.6)\n", + "Requirement already satisfied: contourpy>=1.0.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (1.1.0)\n", + "Requirement already satisfied: cycler>=0.10 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (0.11.0)\n", + "Requirement already satisfied: fonttools>=4.22.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (4.42.0)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (1.4.4)\n", + "Requirement already satisfied: pyparsing<3.1,>=2.3.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (3.0.9)\n", + "Requirement already satisfied: python-dateutil>=2.7 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (2.8.2)\n", + "Requirement already satisfied: importlib-resources>=3.2.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from matplotlib~=3.7.1->drillvision) (6.0.1)\n", + "Requirement already satisfied: pytz>=2020.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pandas~=2.0.1->drillvision) (2023.3)\n", + "Requirement already satisfied: tzdata>=2022.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pandas~=2.0.1->drillvision) (2023.3)\n", + "Requirement already satisfied: iniconfig in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pytest~=7.3.1->drillvision) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pytest~=7.3.1->drillvision) (1.2.0)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0rc8 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pytest~=7.3.1->drillvision) (1.1.2)\n", + "Requirement already satisfied: tomli>=1.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pytest~=7.3.1->drillvision) (2.0.1)\n", + "Requirement already satisfied: tensorflow-intel==2.12.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow~=2.12.0->drillvision) (2.12.1)\n", + "Requirement already satisfied: absl-py>=1.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.4.0)\n", + "Requirement already satisfied: astunparse>=1.6.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.6.3)\n", + "Requirement already satisfied: flatbuffers>=2.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (23.5.26)\n", + "Requirement already satisfied: gast<=0.4.0,>=0.2.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.4.0)\n", + "Requirement already satisfied: google-pasta>=0.1.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.2.0)\n", + "Requirement already satisfied: h5py>=2.9.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (3.9.0)\n", + "Requirement already satisfied: jax>=0.3.15 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.4.14)\n", + "Requirement already satisfied: libclang>=13.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (16.0.6)\n", + "Requirement already satisfied: opt-einsum>=2.3.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (3.3.0)\n", + "Requirement already satisfied: protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (4.23.4)\n", + "Requirement already satisfied: setuptools in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (65.5.1)\n", + "Requirement already satisfied: six>=1.12.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.16.0)\n", + "Requirement already satisfied: termcolor>=1.1.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.3.0)\n", + "Requirement already satisfied: wrapt<1.15,>=1.11.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.14.1)\n", + "Requirement already satisfied: grpcio<2.0,>=1.24.3 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.56.2)\n", + "Requirement already satisfied: tensorboard<2.13,>=2.12 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.12.3)\n", + "Requirement already satisfied: tensorflow-estimator<2.13,>=2.12.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.12.0)\n", + "Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.23.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.31.0)\n", + "Requirement already satisfied: zipp>=3.1.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from importlib-resources>=3.2.0->matplotlib~=3.7.1->drillvision) (3.16.2)\n", + "Requirement already satisfied: parso<0.9.0,>=0.8.3 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from jedi>=0.16->IPython~=8.13.2->drillvision) (0.8.3)\n", + "Requirement already satisfied: wcwidth in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30->IPython~=8.13.2->drillvision) (0.2.6)\n", + "Requirement already satisfied: soupsieve>1.2 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from beautifulsoup4->bs4==0.0.1->drillvision) (2.4.1)\n", + "Requirement already satisfied: executing>=1.2.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from stack-data->IPython~=8.13.2->drillvision) (1.2.0)\n", + "Requirement already satisfied: asttokens>=2.1.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from stack-data->IPython~=8.13.2->drillvision) (2.2.1)\n", + "Requirement already satisfied: pure-eval in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from stack-data->IPython~=8.13.2->drillvision) (0.2.2)\n", + "Requirement already satisfied: wheel<1.0,>=0.23.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from astunparse>=1.6.0->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.38.4)\n", + "Requirement already satisfied: ml-dtypes>=0.2.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.2.0)\n", + "Requirement already satisfied: importlib-metadata>=4.6 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from jax>=0.3.15->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (6.8.0)\n", + "Requirement already satisfied: google-auth<3,>=1.6.3 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.22.0)\n", + "Requirement already satisfied: google-auth-oauthlib<1.1,>=0.5 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.0.0)\n", + "Requirement already satisfied: markdown>=2.6.8 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (3.4.4)\n", + "Requirement already satisfied: tensorboard-data-server<0.8.0,>=0.7.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.7.1)\n", + "Requirement already satisfied: werkzeug>=1.0.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.3.6)\n", + "Requirement already satisfied: cachetools<6.0,>=2.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (5.3.1)\n", + "Requirement already satisfied: pyasn1-modules>=0.2.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.3.0)\n", + "Requirement already satisfied: rsa<5,>=3.1.4 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (4.9)\n", + "Requirement already satisfied: requests-oauthlib>=0.7.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (1.3.1)\n", + "Requirement already satisfied: MarkupSafe>=2.1.1 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from werkzeug>=1.0.1->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (2.1.3)\n", + "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (0.5.0)\n", + "Requirement already satisfied: oauthlib>=3.0.0 in c:\\users\\atashne\\desktop\\drillbitvision\\venv\\lib\\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<1.1,>=0.5->tensorboard<2.13,>=2.12->tensorflow-intel==2.12.1->tensorflow~=2.12.0->drillvision) (3.2.2)\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "\n", + "[notice] A new release of pip is available: 23.2.1 -> 23.3.1\n", + "[notice] To update, run: python.exe -m pip install --upgrade pip\n" + ] + } + ], + "source": [ + "!pip install drillvision" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "outputs": [], + "source": [ + "from neural_network_model.process_data import Preprocessing" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:54:25.474755Z", + "start_time": "2023-11-19T22:54:22.223807800Z" + } + }, + "id": "e57317e7318f48a5" + }, + { + "cell_type": "code", + "execution_count": 3, + "outputs": [], + "source": [ + "from pathlib import Path" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:54:35.086738300Z", + "start_time": "2023-11-19T22:54:35.069738300Z" + } + }, + "id": "bd4c1f2437953f66" + }, + { + "cell_type": "code", + "execution_count": 5, + "outputs": [], + "source": [ + "obj = Preprocessing(dataset_address=Path(\"__file__\").parent / \"..\" / \"dataset\")" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:57:03.473971400Z", + "start_time": "2023-11-19T22:57:03.460973100Z" + } + }, + "id": "ad59a60d5e3f9256" + }, + { + "cell_type": "code", + "execution_count": 6, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[%] Downloading Images to C:\\Users\\atashne\\Desktop\\DrillBitVision\\tutorial\\..\\dataset\\pdc_bit\n", + "\n", + "\n", + "[!!]Indexing page: 1\n", + "[%] Indexed 5 Images on Page 1.\n", + "\n", + "===============================================\n", + "\n", + "[%] Downloading Image #1 from http://www.drillingcontractor.org/wp-content/uploads/2012/08/web_bit-illus..jpg\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #2 from http://www.drillingcontractor.org/wp-content/uploads/2013/01/web_figure-1_schlumberger_spear_bit.jpg\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #3 from https://susmar.fi/pdc/images/Kuvat/sus1.jpg\n", + "[!] Issue getting: https://susmar.fi/pdc/images/Kuvat/sus1.jpg\n", + "[!] Error:: Remote end closed connection without response\n", + "[%] Downloading Image #3 from https://www.roughneckcity.com/store/image/cache/catalog/PDC-Paperweight-800x800-0-.jpg\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #4 from http://www.drillingcontractor.org/wp-content/uploads/2013/07/VarelVoyager-Bit.jpg\n", + "[%] File Downloaded !\n", + "\n", + "\n", + "\n", + "[!!]Indexing page: 2\n", + "[%] Indexed 35 Images on Page 2.\n", + "\n", + "===============================================\n", + "\n", + "[%] Downloading Image #5 from https://www.slb.com/-/media/images/bdt/pdc-bits/spear-bit1-combo.ashx\n", + "[Error]Invalid image, not saving https://www.slb.com/-/media/images/bdt/pdc-bits/spear-bit1-combo.ashx\n", + "\n", + "[!] Issue getting: https://www.slb.com/-/media/images/bdt/pdc-bits/spear-bit1-combo.ashx\n", + "[!] Error:: Invalid image, not saving https://www.slb.com/-/media/images/bdt/pdc-bits/spear-bit1-combo.ashx\n", + "\n", + "[%] Downloading Image #5 from http://rock-drill-bits.com/upload/2020-06/03/weixintupian_20200603164348.jpg\n", + "[%] File Downloaded !\n", + "\n", + "\n", + "\n", + "[%] Done. Downloaded 5 images.\n", + "[%] Downloading Images to C:\\Users\\atashne\\Desktop\\DrillBitVision\\tutorial\\..\\dataset\\rollercone_bit\n", + "\n", + "\n", + "[!!]Indexing page: 1\n", + "[%] Indexed 5 Images on Page 1.\n", + "\n", + "===============================================\n", + "\n", + "[%] Downloading Image #1 from https://1.bp.blogspot.com/-4CSSnudZIJM/WgjzKekx5yI/AAAAAAAACk4/4qBtLgfNi1cTvj3H7kgMeAn2Lh9Y2ka0QCLcBGAs/s1600/Roller%2BCone%2BBit.png\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #2 from https://2.bp.blogspot.com/-uhy2YbGDM3g/WgjzsPhnS5I/AAAAAAAAClA/WSrIGUxXL3Ydcxb86sdVvVNc01lYbFugACLcBGAs/s1600/Roller%2BCone%2BBit2.png\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #3 from http://www.rock-drillingtools.com/photo/rock-drillingtools/editor/20180601153053_22925.jpg\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #4 from https://www.nov.com/-/media/nov/images/products/wbt/reedhycalog/hercules-roller-cone-drill-bits/hercules-roller-cone-drill-bit-three-fourths-render_crop.jpg?h=1080&la=en-us&w=1920&cropregion=0,0,1920,1080&hash=E5F6917EA02E6566EAC6ECE6B30A859B\n", + "[%] File Downloaded !\n", + "\n", + "[%] Downloading Image #5 from https://1.bp.blogspot.com/-3rfgUu4XFFU/UVVyJ9lim8I/AAAAAAAAAPI/yqm_mcW96l8/s400/OSS5%2525%257BB8PI%2529%257D4%2528KO%255BUCUBU1.jpg\n", + "[%] File Downloaded !\n", + "\n", + "\n", + "\n", + "[%] Done. Downloaded 5 images.\n" + ] + } + ], + "source": [ + "obj.download_images()" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:57:11.541080Z", + "start_time": "2023-11-19T22:57:04.908767400Z" + } + }, + "id": "fac4493d05eaf941" + }, + { + "cell_type": "code", + "execution_count": 7, + "outputs": [], + "source": [ + "# or download the data from s3. this is after you have downloaded the data\n", + "# using Process.download_images() and uploaded it to s3\n", + "# this way the data would be consistent across all the users\n", + "# obj = Preprocessing(dataset_address=Path(__file__).parent / \"..\" / \"s3_dataset\")\n", + "# obj.download_images(from_s3=True)" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:57:13.059295800Z", + "start_time": "2023-11-19T22:57:13.049311Z" + } + }, + "id": "96bca0a3c11352ae" + }, + { + "cell_type": "code", + "execution_count": 8, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'pdc_bit': {'image_list': [WindowsPath('../dataset/pdc_bit/Image_1.jpg'), WindowsPath('../dataset/pdc_bit/Image_1.png'), WindowsPath('../dataset/pdc_bit/Image_10.jpg'), WindowsPath('../dataset/pdc_bit/Image_10.png'), WindowsPath('../dataset/pdc_bit/Image_11.jpg'), WindowsPath('../dataset/pdc_bit/Image_12.jpg'), WindowsPath('../dataset/pdc_bit/Image_13.jpg'), WindowsPath('../dataset/pdc_bit/Image_13.png'), WindowsPath('../dataset/pdc_bit/Image_14.jpg'), WindowsPath('../dataset/pdc_bit/Image_15.jpg'), WindowsPath('../dataset/pdc_bit/Image_16.png'), WindowsPath('../dataset/pdc_bit/Image_17.jpg'), WindowsPath('../dataset/pdc_bit/Image_18.jpg'), WindowsPath('../dataset/pdc_bit/Image_19.png'), WindowsPath('../dataset/pdc_bit/Image_2.jpg'), WindowsPath('../dataset/pdc_bit/Image_2.png'), WindowsPath('../dataset/pdc_bit/Image_20.jpg'), WindowsPath('../dataset/pdc_bit/Image_20.png'), WindowsPath('../dataset/pdc_bit/Image_21.jpg'), WindowsPath('../dataset/pdc_bit/Image_22.jpg'), WindowsPath('../dataset/pdc_bit/Image_22.png'), WindowsPath('../dataset/pdc_bit/Image_23.jpg'), WindowsPath('../dataset/pdc_bit/Image_24.jpg'), WindowsPath('../dataset/pdc_bit/Image_24.png'), WindowsPath('../dataset/pdc_bit/Image_25.jpg'), WindowsPath('../dataset/pdc_bit/Image_26.jpg'), WindowsPath('../dataset/pdc_bit/Image_27.jpg'), WindowsPath('../dataset/pdc_bit/Image_27.png'), WindowsPath('../dataset/pdc_bit/Image_28.jpg'), WindowsPath('../dataset/pdc_bit/Image_29.jpg'), WindowsPath('../dataset/pdc_bit/Image_3.jpg'), WindowsPath('../dataset/pdc_bit/Image_3.png'), WindowsPath('../dataset/pdc_bit/Image_30.jpg'), WindowsPath('../dataset/pdc_bit/Image_30.png'), WindowsPath('../dataset/pdc_bit/Image_4.jpg'), WindowsPath('../dataset/pdc_bit/Image_4.png'), WindowsPath('../dataset/pdc_bit/Image_5.jpg'), WindowsPath('../dataset/pdc_bit/Image_5.png'), WindowsPath('../dataset/pdc_bit/Image_6.jpg'), WindowsPath('../dataset/pdc_bit/Image_6.png'), WindowsPath('../dataset/pdc_bit/Image_7.jpg'), WindowsPath('../dataset/pdc_bit/Image_7.png'), WindowsPath('../dataset/pdc_bit/Image_8.jpg'), WindowsPath('../dataset/pdc_bit/Image_8.png'), WindowsPath('../dataset/pdc_bit/Image_9.jpg'), WindowsPath('../dataset/pdc_bit/Image_9.png')], 'number_of_images': 46}, 'rollercone_bit': {'image_list': [WindowsPath('../dataset/rollercone_bit/Image_1.jpg'), WindowsPath('../dataset/rollercone_bit/Image_1.png'), WindowsPath('../dataset/rollercone_bit/Image_10.jpg'), WindowsPath('../dataset/rollercone_bit/Image_11.jpg'), WindowsPath('../dataset/rollercone_bit/Image_12.jpg'), WindowsPath('../dataset/rollercone_bit/Image_13.jpg'), WindowsPath('../dataset/rollercone_bit/Image_14.jpg'), WindowsPath('../dataset/rollercone_bit/Image_15.jpg'), WindowsPath('../dataset/rollercone_bit/Image_16.png'), WindowsPath('../dataset/rollercone_bit/Image_17.jpg'), WindowsPath('../dataset/rollercone_bit/Image_18.jpg'), WindowsPath('../dataset/rollercone_bit/Image_19.jpg'), WindowsPath('../dataset/rollercone_bit/Image_2.png'), WindowsPath('../dataset/rollercone_bit/Image_20.jpg'), WindowsPath('../dataset/rollercone_bit/Image_21.jpg'), WindowsPath('../dataset/rollercone_bit/Image_22.jpg'), WindowsPath('../dataset/rollercone_bit/Image_23.jpg'), WindowsPath('../dataset/rollercone_bit/Image_24.jpg'), WindowsPath('../dataset/rollercone_bit/Image_25.jpg'), WindowsPath('../dataset/rollercone_bit/Image_26.jpg'), WindowsPath('../dataset/rollercone_bit/Image_27.jpg'), WindowsPath('../dataset/rollercone_bit/Image_28.jpg'), WindowsPath('../dataset/rollercone_bit/Image_29.jpg'), WindowsPath('../dataset/rollercone_bit/Image_3.jpg'), WindowsPath('../dataset/rollercone_bit/Image_30.jpg'), WindowsPath('../dataset/rollercone_bit/Image_4.jpg'), WindowsPath('../dataset/rollercone_bit/Image_4.png'), WindowsPath('../dataset/rollercone_bit/Image_5.jpg'), WindowsPath('../dataset/rollercone_bit/Image_6.jpg'), WindowsPath('../dataset/rollercone_bit/Image_7.jpg'), WindowsPath('../dataset/rollercone_bit/Image_8.jpg'), WindowsPath('../dataset/rollercone_bit/Image_9.jpg')], 'number_of_images': 32}}\n" + ] + } + ], + "source": [ + "print(obj.image_dict)" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:57:14.235123700Z", + "start_time": "2023-11-19T22:57:14.223474700Z" + } + }, + "id": "e5d93aebe5987ddb" + }, + { + "cell_type": "code", + "execution_count": 10, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "Augmenting pdc_bit images:: 0%| | 0/10 [00:00 1\u001B[0m \u001B[43mobj\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43maugment_data\u001B[49m\u001B[43m(\u001B[49m\u001B[43mnumber_of_images_tobe_gen\u001B[49m\u001B[38;5;241;43m=\u001B[39;49m\u001B[38;5;241;43m10\u001B[39;49m\u001B[43m)\u001B[49m\n", + "File \u001B[1;32m~\\Desktop\\DrillBitVision\\neural_network_model\\process_data.py:217\u001B[0m, in \u001B[0;36mPreprocessing.augment_data\u001B[1;34m(self, number_of_images_tobe_gen, augment_data_address)\u001B[0m\n\u001B[0;32m 214\u001B[0m img \u001B[38;5;241m=\u001B[39m load_img(img_address)\n\u001B[0;32m 216\u001B[0m x \u001B[38;5;241m=\u001B[39m img_to_array(img)\n\u001B[1;32m--> 217\u001B[0m x \u001B[38;5;241m=\u001B[39m x\u001B[38;5;241m.\u001B[39mreshape((\u001B[38;5;241m1\u001B[39m,) \u001B[38;5;241m+\u001B[39m \u001B[43mx\u001B[49m\u001B[38;5;241;43m.\u001B[39;49m\u001B[43mshape\u001B[49m\u001B[43m(\u001B[49m\u001B[43m)\u001B[49m)\n\u001B[0;32m 219\u001B[0m \u001B[38;5;28;01mfor\u001B[39;00m _ \u001B[38;5;129;01min\u001B[39;00m Augment_data_gen\u001B[38;5;241m.\u001B[39mflow(\n\u001B[0;32m 220\u001B[0m x,\n\u001B[0;32m 221\u001B[0m batch_size\u001B[38;5;241m=\u001B[39mSETTING\u001B[38;5;241m.\u001B[39mAUGMENTATION_SETTING\u001B[38;5;241m.\u001B[39mBATCH_SIZE,\n\u001B[1;32m (...)\u001B[0m\n\u001B[0;32m 226\u001B[0m save_format\u001B[38;5;241m=\u001B[39mSETTING\u001B[38;5;241m.\u001B[39mAUGMENTATION_SETTING\u001B[38;5;241m.\u001B[39mAUGMENTED_IMAGES_SAVE_FORMAT,\n\u001B[0;32m 227\u001B[0m ):\n\u001B[0;32m 228\u001B[0m \u001B[38;5;28;01mbreak\u001B[39;00m\n", + "\u001B[1;31mTypeError\u001B[0m: 'tuple' object is not callable" + ] + } + ], + "source": [ + "obj.augment_data(number_of_images_tobe_gen=10)" + ], + "metadata": { + "collapsed": false, + "ExecuteTime": { + "end_time": "2023-11-19T22:58:10.526610600Z", + "start_time": "2023-11-19T22:58:10.479240900Z" + } + }, + "id": "158a0cc603be9691" + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "obj._train_test_split()" + ], + "metadata": { + "collapsed": false + }, + "id": "ec6e2f0d09e8a76f" + }, + { + "cell_type": "code", + "execution_count": null, + "outputs": [], + "source": [ + "obj.print_deepnet_project_metadata()" + ], + "metadata": { + "collapsed": false + }, + "id": "2c45dd8412c34d35" + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}