image
imagewidth (px) 126
224
| label
class label 2
classes |
---|---|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
|
0hotdog
|
π Hotdog or Not Hotdog? π
Welcome to the Silicon Valley inspired dataset: Hotdog or Not Hotdog! This repository contains images of hotdogs and other foods, perfectly curated for all your machine learning shenanigans.
Why Hotdog or Not Hotdog? π€
Inspired by the iconic Jian-Yang's app from the TV series Silicon Valley, this dataset is your gateway to mastering the subtle art of food recognition. Whether you're building the next revolutionary food identification app or just having fun with deep learning, we've got you covered.
Dataset Contents π½οΈ
The dataset is organized into two main folders:
- hotdog/: Pictures of the glorious, delicious hotdogs.
- not_hotdog/: Pictures of other foods (burgers, pizzas, sushi, you name it).
Here's a sneak peek:
train/
βββ hotdog/
β βββ hotdog1.jpg
β βββ hotdog2.jpg
β βββ ...
βββ not_hotdog/
βββ not_hotdog1.jpg
βββ not_hotdog2.jpg
βββ ...
Usage π
Clone the repo:
git clone https://github.com/truepositive/hotdog_nothotdog
Train your model: Use your favorite machine learning framework to train a classifier on the dataset. Here's an example using TensorFlow/Keras:
from tensorflow.keras.preprocessing.image import ImageDataGenerator from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense # Prepare data generators datagen = ImageDataGenerator(rescale=1./255, validation_split=0.2) train_generator = datagen.flow_from_directory('data/', target_size=(150, 150), batch_size=32, class_mode='binary', subset='training') validation_generator = datagen.flow_from_directory('data/', target_size=(150, 150), batch_size=32, class_mode='binary', subset='validation') # Build the model model = Sequential([ Conv2D(32, (3, 3), activation='relu', input_shape=(150, 150, 3)), MaxPooling2D((2, 2)), Conv2D(64, (3, 3), activation='relu'), MaxPooling2D((2, 2)), Flatten(), Dense(128, activation='relu'), Dense(1, activation='sigmoid') ]) model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy']) model.fit(train_generator, epochs=10, validation_data=validation_generator)
Predict the hotdog-ness:
from tensorflow.keras.preprocessing import image import numpy as np def is_hotdog(img_path): img = image.load_img(img_path, target_size=(150, 150)) img_array = image.img_to_array(img) / 255.0 img_array = np.expand_dims(img_array, axis=0) prediction = model.predict(img_array) return "Hotdog!" if prediction[0][0] > 0.5 else "Not Hotdog!" print(is_hotdog('path/to/your/test/image.jpg'))
Contributing π€
Feel free to fork this repository, open issues, and submit pull requests. We welcome contributions from all food enthusiasts and tech geeks alike!
License π
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
Acknowledgments π«Ά
- Thanks to HBO's "Silicon Valley" for the hilarious inspiration.
- Shoutout to all foodies and machine learning enthusiasts for making data science delicious!
Disclaimer : No hotdogs were harmed in the making of this dataset.
- Downloads last month
- 66