{"cells":[{"cell_type":"markdown","metadata":{"_cell_guid":"7276f30b-c822-fff7-0656-b7f35b63b2e4"},"source":"# Xception for Dogs vs. Cats (LB: ???)\n\nThis notebook was inspired by [the Xception paper](https://arxiv.org/pdf/1610.02357v2.pdf) and Keras's [Xception net](https://keras.io/applications/#xception). If you like my notebook, upvote it but also consider sending a nice message to [François Chollet](mailto://fchollet@google.com) telling him how awesome Xception is."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"51e02fdf-560a-0518-275c-015d0b25c53e"},"outputs":[],"source":"import os, cv2, random\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt\nfrom keras.applications.xception import Xception, preprocess_input, decode_predictions\nfrom keras.preprocessing import image"},{"cell_type":"markdown","metadata":{"_cell_guid":"b380c687-eb8f-51dc-ee62-bba55f1fa791"},"source":"I'm familiar with Xception from another task and wanted to see how well it did on the Dogs vs. Cats problem. Xception is a large neural net architecture employing deep convolutional modules and building on prior work on [Inception V3](https://www.robots.ox.ac.uk/~vgg/rg/papers/reinception.pdf). It's pretty cool. (Source code for Xception is [here](https://github.com/fchollet/deep-learning-models/blob/master/xception.py), have a look.)"},{"cell_type":"markdown","metadata":{"_cell_guid":"e71a79b4-b4d0-5079-aaff-53cd2b71fb1c"},"source":"Pick a number between 0 and 25000 and run the pre-trained Xception net on it, the results of my (informal) tests were phenomenal."},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"91d658a8-a900-f622-b575-01e348bc9da1"},"outputs":[],"source":"model = Xception(include_top = True, weights = 'imagenet')"},{"cell_type":"code","execution_count":null,"metadata":{"_cell_guid":"50077561-7619-1cfa-6729-167a6d534ccc"},"outputs":[],"source":""}],"metadata":{"_change_revision":0,"_is_fork":false,"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.5.2"}},"nbformat":4,"nbformat_minor":0}