{"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 os, sys\nfrom PIL import Image\nfrom tqdm import tqdm","metadata":{"execution":{"iopub.status.busy":"2022-09-24T10:12:01.747339Z","iopub.execute_input":"2022-09-24T10:12:01.747931Z","iopub.status.idle":"2022-09-24T10:12:01.778235Z","shell.execute_reply.started":"2022-09-24T10:12:01.747803Z","shell.execute_reply":"2022-09-24T10:12:01.776052Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir train","metadata":{"execution":{"iopub.status.busy":"2022-09-24T10:12:01.910415Z","iopub.execute_input":"2022-09-24T10:12:01.910924Z","iopub.status.idle":"2022-09-24T10:12:02.943904Z","shell.execute_reply.started":"2022-09-24T10:12:01.910868Z","shell.execute_reply":"2022-09-24T10:12:02.941808Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for infile in tqdm(os.listdir(\"../input/datathonindoml-2022/train/train/\")):\n    outfile = './train/'+infile[:-3] + \"jpeg\"\n    im = Image.open('../input/datathonindoml-2022/train/train/'+infile)\n    out = im.convert(\"RGB\")\n    out.save(outfile, \"JPEG\", quality=300)","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-09-24T10:12:13.375331Z","iopub.execute_input":"2022-09-24T10:12:13.376855Z","iopub.status.idle":"2022-09-24T10:22:04.421724Z","shell.execute_reply.started":"2022-09-24T10:12:13.376794Z","shell.execute_reply":"2022-09-24T10:22:04.419557Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!mkdir test","metadata":{"execution":{"iopub.status.busy":"2022-09-24T10:22:20.972392Z","iopub.execute_input":"2022-09-24T10:22:20.972955Z","iopub.status.idle":"2022-09-24T10:22:22.027044Z","shell.execute_reply.started":"2022-09-24T10:22:20.972889Z","shell.execute_reply":"2022-09-24T10:22:22.025364Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for infile in tqdm(os.listdir(\"../input/datathonindoml-2022/validation/validation/\")):\n    outfile = './test/'+infile[:-3] + \"jpeg\"\n    im = Image.open('../input/datathonindoml-2022/validation/validation/'+infile)\n    out = im.convert(\"RGB\")\n    out.save(outfile, \"JPEG\", quality=300)","metadata":{"execution":{"iopub.status.busy":"2022-09-24T10:23:56.993862Z","iopub.execute_input":"2022-09-24T10:23:56.994465Z","iopub.status.idle":"2022-09-24T10:24:28.426401Z","shell.execute_reply.started":"2022-09-24T10:23:56.994417Z","shell.execute_reply":"2022-09-24T10:24:28.424970Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}