{"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":"import torch\nimport pandas as pd\nimport cv2\nimport os \nimport matplotlib.pyplot as plt\nfrom matplotlib.pyplot import figure","metadata":{"execution":{"iopub.status.busy":"2022-03-19T12:16:00.135512Z","iopub.execute_input":"2022-03-19T12:16:00.135792Z","iopub.status.idle":"2022-03-19T12:16:00.141601Z","shell.execute_reply.started":"2022-03-19T12:16:00.135763Z","shell.execute_reply":"2022-03-19T12:16:00.14014Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"def invert_color(img): \n    return 255-img\n\ndef load_image(img_path):\n    img = cv2.imread(img_path)\n    return img\n\ndef load_image(img_path):\n    img = cv2.imread(img_path)\n    return img\n\ndef illustration(img_id):\n    \"\"\"\n    id is the id of the input image\n    \"\"\"\n    img_path = f'../input/ultra-mnist/train/{img_id}.jpeg'\n    img = load_image(img_path)\n    inverted_img = invert_color(img)\n    my_plot(img,inverted_img)","metadata":{"execution":{"iopub.status.busy":"2022-03-19T12:16:00.345963Z","iopub.execute_input":"2022-03-19T12:16:00.346279Z","iopub.status.idle":"2022-03-19T12:16:00.353574Z","shell.execute_reply.started":"2022-03-19T12:16:00.346228Z","shell.execute_reply":"2022-03-19T12:16:00.3526Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"img_id =  'zllfkikwrw'\nillustration(img_id)","metadata":{"execution":{"iopub.status.busy":"2022-03-19T12:33:38.192285Z","iopub.execute_input":"2022-03-19T12:33:38.192589Z","iopub.status.idle":"2022-03-19T12:33:43.526835Z","shell.execute_reply.started":"2022-03-19T12:33:38.192559Z","shell.execute_reply":"2022-03-19T12:33:43.526127Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}