Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damienpontifex/mobilenet-classifier-transfer
Train a binary classifier from mobilenet
https://github.com/damienpontifex/mobilenet-classifier-transfer
classification computer-vision keras mobilenet tensorflow tensorflow-serving
Last synced: about 6 hours ago
JSON representation
Train a binary classifier from mobilenet
- Host: GitHub
- URL: https://github.com/damienpontifex/mobilenet-classifier-transfer
- Owner: damienpontifex
- Created: 2019-07-25T23:31:40.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-25T01:00:07.000Z (over 1 year ago)
- Last Synced: 2024-04-23T14:30:08.787Z (7 months ago)
- Topics: classification, computer-vision, keras, mobilenet, tensorflow, tensorflow-serving
- Language: Python
- Size: 9.77 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mobilenet Classifier by transfer learning
## Dependencies
```bash
python -m pip install -U tensorflow==2.0.0-beta1 tensorflow_hub
```## Data
Setup data under a directory named 'images' with the two categories as folders themselves. i.e.- images
- cat
- cat1.jpeg
- cat2.jpeg
- dog
- dog1.jpeg
- dog2.jpeg## Train
To run inside the TF20 docker container
```bash
python binary_classifier_train.py --data-directory images
```## Predict
```bash
python binary_classifier_predict.py --image-path .jpeg
```## Build TF Serving container
```bash
docker build -t /myclassifier -f Serving.Dockerfile .
```TODO: provide REST and gRPC examples calling server in container
## Use in TensorFlow.js
Run webserver in repo root to serve index.html
```bash
python3 -m http.server
```
TODO: Still to do predictions inside TF.js