Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Annalie Kruseman 493b2a919f
Predict on drawn image
3 years ago
13088d2a6a
Initialize DVC
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
ee38acc607
Add model to Git
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
13088d2a6a
Initialize DVC
3 years ago
ee38acc607
Add model to Git
3 years ago
ee38acc607
Add model to Git
3 years ago
493b2a919f
Predict on drawn image
3 years ago
e6483ffe16
Predict on drawn image
3 years ago
ee38acc607
Add model to Git
3 years ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

README.md

You have to be logged in to leave a comment. Sign In

Flower Type Predictions with TensorFlow

Description

This repository shows how to use TensorFlow to classify images.

When building this model I was especially interested whether the model would be able to classify my own hand drawn and water color painted images correctly.

One of the challenges I was facing when starting with TensorFlow was running it on my local laptop. However, it is possible to run TensorFlow on your local laptop without GPU capability or without connecting to a paid virtual machine directly. In order to do this TensorFlow is run through the tensorflow/tensorflow Docker container. Below I will describe how you can run TensorFlow on your local laptop.

Getting Started

Prerequisites

Assuming you've installed Docker, download the image of the tensorflow/tensorflow docker container by running the following command line.

docker pull tensorflow/tensorflow

Then, run the Docker container and start a bash shell session. Adding the -v to the below command line mounts the host directory where you're running your Docker container to the containers working directory. In this example I'm working in the home/ folder in the container. Specify port 8888:8888 with -p to run jupyter notebook through your shell. Specify a name for the running container by using --name. Adding -it to the command line means the container is running in interactive mode. Finally run the docker container and add bash at the end.

docker run -it -p 8888:8888 —-name DOCKER_CONTAINER_NAME -v $PWD:/home tensorflow/tensorflow bash

Now you're ready to start using TensorFlow.

Installation

Run the TensorFlow CNN model from this repository by running the following in the command line:

make

The model will be stored in the folder model/.

(If prompted with the error "ImportError: libGL.so.1: cannot open shared object file: No such file or directory" install libgl with apt install libgl1-mesa-glx)

Usage

The model uses hyperparameter tuning as a part of training the model. After the model is saved in the folder model/ the module predict.py in the folder flower_types/ lets you predict any image through either an url or from an image downloaded in the folder test/. The predicted image is then stored in the folder predictions/.

To try this out I've added a photo of a rose in the tests/ folder and run the following in the command line:

python flower_types/predict.py drawn_tulip.png

The following picture will then appear in the folder predictions/. We find that the model predicts this drawing as a dandelion. However, the model was very close to predicting the image as a tulip. 0.24 for the dandelion class versus 0.22 for the tulip class. Given that this model was run on a 32x32 pixelation of the image. I'm very happy with the results :grinning:

Flower Prediction

Authors and Acknowledgment

Annalie Kruseman

Feel free to contact me for any questions on annaliakruseman@gmail.com

Dataset downloaded from Kaggles ‘Flower Types’ open source dataset

Tip!

Press p or to see the previous file or, n or to see the next file

About

No description

Collaborators 1

Comments

Loading...