├── LICENSE ├── README.md └── info ├── Dog_and_Cat_faces ├── README.md ├── dog1.png └── doggo.png ├── Food101 ├── README.md └── labels.txt └── MNIST ├── 4.png └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Infinite Red, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # The Keras Model Zoo 2 | 3 | Ready to go, downloadable models for Keras 4 | 5 | ``` 6 | .-----------------._,, 7 | | KERAS (_")= 8 | | MODEL ||| __ 9 | | 🐆 ZOO 🐅 ||#\_____ .-/ \ 10 | ssgg |------------------|\# # # #\ .'' ..'----,_ 11 | ____SG ..] | |/ | \##_#_#/\ =:.'-\ )\ 12 | ,-( _ SS(_9)_| _(") | |/|/\|\| :: | ,_ / ` 13 | / (_____;-.____;; o(_,\\ | I I I I ` [|_/\\_] 14 | ``` 15 | 16 | hosted with :heart: from [Infinite Red](https://infinitered.webflow.io/ai-machine-learning) 17 | 18 | | Model | Description | 19 | | ------------------------------------------------------ | -------------------------------------------------- | 20 | | [Food 101](./info/Food101/README.md) | Classify 101 different types of food from an image | 21 | | [Dog and Cat Faces](/info/Dog_and_Cat_faces/README.md) | Find those cute dog and cat faces in any photo | 22 | | [MNIST](./info/MNIST/README.md) | Classify single handwritten digits from 0 to 9 | 23 | 24 | ## How to Contribute 25 | 26 | ### Hosting the Model 27 | 28 | **We will host the model file.** Do a pull request with your updates and a link to your model. During review we will download and host your model on our S3 so you can update your pull request URL to one that we will host. You simply need to find a way to get your model in our hands temporarily and we'll take on the hosting for the repo. 29 | 30 | ### Your Pull Request 31 | 32 | Update the README.md to have all the information on your provided model. Then add a folder in the `/info` section that includes credit, examples, and more friendly information on your trained keras model. 33 | -------------------------------------------------------------------------------- /info/Dog_and_Cat_faces/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Find those cute dog and cat faces in any photo 4 | 5 | # Download 6 | 7 | https://s3.amazonaws.com/ir_public/ai/keras-zoo/dnc_faces.h5 8 | 9 | # Input/Output 10 | 11 | - 256x256 RGB Image Tensor 12 | - Normalized (0 to 1) 4 corners of the pet face 13 | 14 | # Dogs and Cat Faces 15 | 16 | Green box is the predicted face, red box is the marked face. 17 | 18 | ```python 19 | box = model.predict(np.expand_dims(img, 0))[0] 20 | box = [int(IMG_SIZE*i) for i in box] 21 | annotated = cv2.rectangle((img*255) , (box[0], box[1]), (box[2], box[3]), (0, 255, 0), 2) 22 | box = [int(IMG_SIZE * i) for i in y[0]] 23 | annotated = cv2.rectangle((annotated) , (box[0], box[1]), (box[2], box[3]), (255, 0, 0), 2) 24 | 25 | plt.axis('off') 26 | plt.imshow((annotated ).astype('uint8')) 27 | ``` 28 | 29 | ![dog example](./dog1.png) ![dog example 2](./doggo.png) 30 | 31 | # Credits 32 | 33 | - Model was trained on the The Oxford-IIIT Pet Dataset: http://www.robots.ox.ac.uk/~vgg/data/pets/ 34 | -------------------------------------------------------------------------------- /info/Dog_and_Cat_faces/dog1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infinitered/keras-model-zoo/5938c47285da543dfa46f61a1a6ca0aeb32808c3/info/Dog_and_Cat_faces/dog1.png -------------------------------------------------------------------------------- /info/Dog_and_Cat_faces/doggo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infinitered/keras-model-zoo/5938c47285da543dfa46f61a1a6ca0aeb32808c3/info/Dog_and_Cat_faces/doggo.png -------------------------------------------------------------------------------- /info/Food101/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | Classify 101 different types of food from an image 4 | 5 | # Download 6 | 7 | https://s3.amazonaws.com/ir_public/ai/keras-zoo/food_101.h5 8 | 9 | # Input / Output 10 | 11 | - Input: [batch, 299, 299, 3] 12 | - Output: Softmax index of food: 101 possible categories 13 | 14 | # Categories 15 | 16 | apple_pie, baby_back_ribs, baklava, beef_carpaccio, beef_tartare, beet_salad, beignets, bibimbap, bread_pudding, breakfast_burrito, bruschetta, caesar_salad, cannoli, caprese_salad, carrot_cake, ceviche, cheese_plate, cheesecake, chicken_curry, chicken_quesadilla, chicken_wings, chocolate_cake, chocolate_mousse, churros, clam_chowder, club_sandwich, crab_cakes, creme_brulee, croque_madame, cup_cakes, deviled_eggs, donuts, dumplings, edamame, eggs_benedict, escargots, falafel, filet_mignon, fish_and_chips, foie_gras, french_fries, french_onion_soup, french_toast, fried_calamari, fried_rice, frozen_yogurt, garlic_bread, gnocchi, greek_salad, grilled_cheese_sandwich, grilled_salmon, guacamole, gyoza, hamburger, hot_and_sour_soup, hot_dog, huevos_rancheros, hummus, ice_cream, lasagna, lobster_bisque, lobster_roll_sandwich, macaroni_and_cheese, macarons, miso_soup, mussels, nachos, omelette, onion_rings, oysters, pad_thai, paella, pancakes, panna_cotta, peking_duck, pho, pizza, pork_chop, poutine, prime_rib, pulled_pork_sandwich, ramen, ravioli, red_velvet_cake, risotto, samosa, sashimi, scallops, seaweed_salad, shrimp_and_grits, spaghetti_bolognese, spaghetti_carbonara, spring_rolls, steak, strawberry_shortcake, sushi, tacos, takoyaki, tiramisu, tuna_tartare, waffles 17 | 18 | [labels.txt file](./labels.txt) 19 | 20 | # Credits 21 | 22 | - The Food 101 dataset - http://visiir.lip6.fr/explore 23 | - Hosted on Kaggle - https://www.kaggle.com/dansbecker/food-101 24 | -------------------------------------------------------------------------------- /info/Food101/labels.txt: -------------------------------------------------------------------------------- 1 | apple_pie 2 | baby_back_ribs 3 | baklava 4 | beef_carpaccio 5 | beef_tartare 6 | beet_salad 7 | beignets 8 | bibimbap 9 | bread_pudding 10 | breakfast_burrito 11 | bruschetta 12 | caesar_salad 13 | cannoli 14 | caprese_salad 15 | carrot_cake 16 | ceviche 17 | cheese_plate 18 | cheesecake 19 | chicken_curry 20 | chicken_quesadilla 21 | chicken_wings 22 | chocolate_cake 23 | chocolate_mousse 24 | churros 25 | clam_chowder 26 | club_sandwich 27 | crab_cakes 28 | creme_brulee 29 | croque_madame 30 | cup_cakes 31 | deviled_eggs 32 | donuts 33 | dumplings 34 | edamame 35 | eggs_benedict 36 | escargots 37 | falafel 38 | filet_mignon 39 | fish_and_chips 40 | foie_gras 41 | french_fries 42 | french_onion_soup 43 | french_toast 44 | fried_calamari 45 | fried_rice 46 | frozen_yogurt 47 | garlic_bread 48 | gnocchi 49 | greek_salad 50 | grilled_cheese_sandwich 51 | grilled_salmon 52 | guacamole 53 | gyoza 54 | hamburger 55 | hot_and_sour_soup 56 | hot_dog 57 | huevos_rancheros 58 | hummus 59 | ice_cream 60 | lasagna 61 | lobster_bisque 62 | lobster_roll_sandwich 63 | macaroni_and_cheese 64 | macarons 65 | miso_soup 66 | mussels 67 | nachos 68 | omelette 69 | onion_rings 70 | oysters 71 | pad_thai 72 | paella 73 | pancakes 74 | panna_cotta 75 | peking_duck 76 | pho 77 | pizza 78 | pork_chop 79 | poutine 80 | prime_rib 81 | pulled_pork_sandwich 82 | ramen 83 | ravioli 84 | red_velvet_cake 85 | risotto 86 | samosa 87 | sashimi 88 | scallops 89 | seaweed_salad 90 | shrimp_and_grits 91 | spaghetti_bolognese 92 | spaghetti_carbonara 93 | spring_rolls 94 | steak 95 | strawberry_shortcake 96 | sushi 97 | tacos 98 | takoyaki 99 | tiramisu 100 | tuna_tartare 101 | waffles 102 | -------------------------------------------------------------------------------- /info/MNIST/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infinitered/keras-model-zoo/5938c47285da543dfa46f61a1a6ca0aeb32808c3/info/MNIST/4.png -------------------------------------------------------------------------------- /info/MNIST/README.md: -------------------------------------------------------------------------------- 1 | # Description 2 | 3 | ![four](./4.png) 4 | Identifies single handwritten digits 5 | 6 | # Download 7 | 8 | https://s3.amazonaws.com/ir_public/ai/keras-zoo/mnist.h5 9 | 10 | # Input / Output 11 | 12 | - Input: [batch, 28, 28, 1] 13 | - Output: Softmax of identified number 0 to 9 14 | 15 | # Dogs and Cat Faces 16 | 17 | ```python 18 | from keras.models import load_model 19 | # Model 20 | mnist_model = load_model("mnist.h5") 21 | # Images 22 | from keras.datasets import mnist 23 | # the data, split between train and test sets 24 | (x_train, y_train), (x_test, y_test) = mnist.load_data() 25 | ten_images = x_train[0:10] 26 | index_to_test = 2 27 | 28 | ten_images = ten_images.astype('float32') 29 | ten_images /= 255 30 | 31 | mnist_model.predict_classes(ten_images[index_to_test].reshape([1, 28, 28, 1])) 32 | 33 | ``` 34 | 35 | RESULT: Numbers 0 to 9 36 | 37 | # Credits 38 | 39 | - History: https://en.wikipedia.org/wiki/MNIST_database 40 | - Data: https://keras.io/examples/mnist_cnn/ 41 | --------------------------------------------------------------------------------