{"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\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":"2021-06-25T08:32:55.378881Z","iopub.execute_input":"2021-06-25T08:32:55.379308Z","iopub.status.idle":"2021-06-25T08:32:55.388523Z","shell.execute_reply.started":"2021-06-25T08:32:55.379221Z","shell.execute_reply":"2021-06-25T08:32:55.387038Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import zipfile\n\nwith zipfile.ZipFile('../input/dogs-vs-cats-redux-kernels-edition/test.zip') as existing_zip:\n    existing_zip.extractall()","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:58:08.864923Z","iopub.execute_input":"2021-06-25T10:58:08.865343Z","iopub.status.idle":"2021-06-25T10:58:15.912102Z","shell.execute_reply.started":"2021-06-25T10:58:08.865239Z","shell.execute_reply":"2021-06-25T10:58:15.910846Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install dask -upgrade","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:58:26.179511Z","iopub.execute_input":"2021-06-25T10:58:26.179843Z","iopub.status.idle":"2021-06-25T10:58:27.853817Z","shell.execute_reply.started":"2021-06-25T10:58:26.179812Z","shell.execute_reply":"2021-06-25T10:58:27.852592Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!pip install Cython","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:58:30.553973Z","iopub.execute_input":"2021-06-25T10:58:30.554393Z","iopub.status.idle":"2021-06-25T10:58:37.511132Z","shell.execute_reply.started":"2021-06-25T10:58:30.554344Z","shell.execute_reply":"2021-06-25T10:58:37.50986Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!git clone https://github.com/pjreddie/darknet","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:59:05.722409Z","iopub.execute_input":"2021-06-25T10:59:05.722877Z","iopub.status.idle":"2021-06-25T10:59:07.448818Z","shell.execute_reply.started":"2021-06-25T10:59:05.722829Z","shell.execute_reply":"2021-06-25T10:59:07.447966Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"cd darknet/","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:59:26.611501Z","iopub.execute_input":"2021-06-25T10:59:26.611832Z","iopub.status.idle":"2021-06-25T10:59:26.617805Z","shell.execute_reply.started":"2021-06-25T10:59:26.611799Z","shell.execute_reply":"2021-06-25T10:59:26.616612Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!make","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:59:29.677549Z","iopub.execute_input":"2021-06-25T10:59:29.677881Z","iopub.status.idle":"2021-06-25T10:59:47.215974Z","shell.execute_reply.started":"2021-06-25T10:59:29.677854Z","shell.execute_reply":"2021-06-25T10:59:47.21473Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!wget https://pjreddie.com/media/files/yolov3.weights","metadata":{"execution":{"iopub.status.busy":"2021-06-25T10:59:58.212367Z","iopub.execute_input":"2021-06-25T10:59:58.21277Z","iopub.status.idle":"2021-06-25T11:00:06.164792Z","shell.execute_reply.started":"2021-06-25T10:59:58.21273Z","shell.execute_reply":"2021-06-25T11:00:06.164031Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import matplotlib.pyplot as plt\nfrom PIL import Image\n\nim = Image.open(\"data/dog.jpg\")\nplt.imshow(im)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:00:13.386391Z","iopub.execute_input":"2021-06-25T11:00:13.386716Z","iopub.status.idle":"2021-06-25T11:00:13.666158Z","shell.execute_reply.started":"2021-06-25T11:00:13.386684Z","shell.execute_reply":"2021-06-25T11:00:13.664955Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"! ./darknet detect cfg/yolov3.cfg yolov3.weights data/dog.jpg","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:00:17.434537Z","iopub.execute_input":"2021-06-25T11:00:17.434853Z","iopub.status.idle":"2021-06-25T11:00:50.422332Z","shell.execute_reply.started":"2021-06-25T11:00:17.434826Z","shell.execute_reply":"2021-06-25T11:00:50.421333Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"im = Image.open(\"predictions.jpg\")\nplt.imshow(im)\nplt.grid(False)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:02:58.168688Z","iopub.execute_input":"2021-06-25T11:02:58.169029Z","iopub.status.idle":"2021-06-25T11:02:58.393414Z","shell.execute_reply.started":"2021-06-25T11:02:58.168997Z","shell.execute_reply":"2021-06-25T11:02:58.392385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"! ./darknet detect cfg/yolov3.cfg yolov3.weights /kaggle/working/test/2.jpg","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:08:54.948348Z","iopub.execute_input":"2021-06-25T11:08:54.948686Z","iopub.status.idle":"2021-06-25T11:09:42.164173Z","shell.execute_reply.started":"2021-06-25T11:08:54.948657Z","shell.execute_reply":"2021-06-25T11:09:42.163006Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"im = Image.open(\"predictions.jpg\")\nplt.imshow(im)\nplt.grid(False)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:09:53.371685Z","iopub.execute_input":"2021-06-25T11:09:53.372302Z","iopub.status.idle":"2021-06-25T11:09:53.544978Z","shell.execute_reply.started":"2021-06-25T11:09:53.37222Z","shell.execute_reply":"2021-06-25T11:09:53.543778Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"! ./darknet detect cfg/yolov3.cfg yolov3.weights /kaggle/working/test/11.jpg","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:14:32.097179Z","iopub.execute_input":"2021-06-25T11:14:32.097679Z","iopub.status.idle":"2021-06-25T11:15:06.924815Z","shell.execute_reply.started":"2021-06-25T11:14:32.097645Z","shell.execute_reply":"2021-06-25T11:15:06.923385Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"im = Image.open(\"predictions.jpg\")\nplt.imshow(im)\nplt.grid(False)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2021-06-25T11:15:09.77611Z","iopub.execute_input":"2021-06-25T11:15:09.776502Z","iopub.status.idle":"2021-06-25T11:15:09.936763Z","shell.execute_reply.started":"2021-06-25T11:15:09.776458Z","shell.execute_reply":"2021-06-25T11:15:09.935702Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}