{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport os\nimport PIL\nimport PIL.Image\nimport tensorflow as tf\nimport cv2\nimport glob\n\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-05-07T19:13:36.863084Z","iopub.execute_input":"2023-05-07T19:13:36.863496Z","iopub.status.idle":"2023-05-07T19:13:46.682406Z","shell.execute_reply.started":"2023-05-07T19:13:36.863467Z","shell.execute_reply":"2023-05-07T19:13:46.681072Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ink=pd.read_csv(\"/kaggle/input/vesuvius-challenge-ink-detection/train/1/inklabels_rle.csv\")\nink","metadata":{"execution":{"iopub.status.busy":"2023-05-07T18:38:48.271241Z","iopub.execute_input":"2023-05-07T18:38:48.271776Z","iopub.status.idle":"2023-05-07T18:38:48.329903Z","shell.execute_reply.started":"2023-05-07T18:38:48.271732Z","shell.execute_reply":"2023-05-07T18:38:48.329099Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img_dir = \"/kaggle/input/vesuvius-challenge-ink-detection/train/1/surface_volume\" # Enter Directory of all images  \ndata_path = os.path.join(img_dir,'*tif') \nfiles = glob.glob(data_path) \ndata = [] \nfor f1 in files: \n    img = cv2.imread(f1) \n    data.append(img) \n    plt.figure() \n    plt.imshow(img) ","metadata":{"execution":{"iopub.status.busy":"2023-05-07T19:14:29.904688Z","iopub.execute_input":"2023-05-07T19:14:29.905089Z","iopub.status.idle":"2023-05-07T19:25:04.185053Z","shell.execute_reply.started":"2023-05-07T19:14:29.905061Z","shell.execute_reply":"2023-05-07T19:25:04.183809Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# path=\"/kaggle/input/vesuvius-challenge-ink-detection/train/1/surface_volume\"\n# for file in glob.glob(path):\n    \nimage1=cv2.imread(\"/kaggle/input/vesuvius-challenge-ink-detection/train/1/surface_volume/23.tif\")\nplt.imshow(image1)\n\n","metadata":{"execution":{"iopub.status.busy":"2023-05-07T18:54:54.430093Z","iopub.execute_input":"2023-05-07T18:54:54.430444Z","iopub.status.idle":"2023-05-07T18:55:02.759506Z","shell.execute_reply.started":"2023-05-07T18:54:54.430394Z","shell.execute_reply":"2023-05-07T18:55:02.758333Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"images_dataset=plt.imshow(data) ","metadata":{"execution":{"iopub.status.busy":"2023-05-07T19:26:59.647297Z","iopub.execute_input":"2023-05-07T19:26:59.647686Z","iopub.status.idle":"2023-05-07T19:27:00.01106Z","shell.execute_reply.started":"2023-05-07T19:26:59.647654Z","shell.execute_reply":"2023-05-07T19:27:00.009457Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"ink=cv2.imread(\"/kaggle/input/vesuvius-challenge-ink-detection/train/1/inklabels.png\")\nplt.imshow(ink)","metadata":{"execution":{"iopub.status.busy":"2023-05-07T18:52:07.30147Z","iopub.execute_input":"2023-05-07T18:52:07.301952Z","iopub.status.idle":"2023-05-07T18:52:15.526337Z","shell.execute_reply.started":"2023-05-07T18:52:07.301913Z","shell.execute_reply":"2023-05-07T18:52:15.525264Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}