{"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":"markdown","source":"# Beginniner Wikipedia Captioning Competition (English Only) \n\nIn this notebook, we will run our starter understanding notebook for the Wikipedia Captioning competition. We have decided to work on a smaller dataset containing english captions only, just for our first phase of modeling. In this notebook, we go over the data types, EDA of our data, model decisions, modeling, and evaluation. ","metadata":{}},{"cell_type":"markdown","source":"## Competition Data \n\nThe data for this competition contains both caption and image data. The images are stored in this competition based on base64 encoded bytes of the image file at a 300px resolution. ","metadata":{}},{"cell_type":"code","source":"df= pd.read_csv('../input/wikipedia-image-caption/image_data_test/image_pixels/test_image_pixels_part-00000.csv', sep='\\t', names=['image_url', 'b64_bytes', 'metadata_url'])\ndf","metadata":{"execution":{"iopub.status.busy":"2021-09-26T18:14:38.449981Z","iopub.execute_input":"2021-09-26T18:14:38.450706Z","iopub.status.idle":"2021-09-26T18:14:41.88027Z","shell.execute_reply.started":"2021-09-26T18:14:38.450657Z","shell.execute_reply":"2021-09-26T18:14:41.879494Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.iloc[0][1]","metadata":{"execution":{"iopub.status.busy":"2021-09-26T18:15:44.769113Z","iopub.execute_input":"2021-09-26T18:15:44.76977Z","iopub.status.idle":"2021-09-26T18:15:44.77741Z","shell.execute_reply.started":"2021-09-26T18:15:44.769733Z","shell.execute_reply":"2021-09-26T18:15:44.776473Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import base64 \nbase64.b64decode(df.iloc[0][1])","metadata":{"execution":{"iopub.status.busy":"2021-09-26T18:22:05.755333Z","iopub.execute_input":"2021-09-26T18:22:05.755651Z","iopub.status.idle":"2021-09-26T18:22:05.764167Z","shell.execute_reply.started":"2021-09-26T18:22:05.755607Z","shell.execute_reply":"2021-09-26T18:22:05.763324Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"captions = pd.read_csv('../input/wikipedia-image-caption/test_caption_list.csv')\nprint(len(captions))\ncaptions.head()","metadata":{},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## What is Byte Data \n\nThe images are stored in this competition based on base64 encoded bytes of the image file at a 300px resolution. We will be using this data to ","metadata":{}}]}