U-Net Implementation in TensorFlow
Re implementation of U-Net in Tensorflow
Original Paper
Summary
Vehicle Detection using U-Net
Objective: detect vehicles
Find a function f such that y = f(X)
Loss function: maximize IOU
(intersection of prediction & grount truth)
-------------------------------------------
(union of prediction & ground truth)
Examples on Test Data: trained for 3 epochs
Get Started
Download dataset
the annotated driving dataset is provided by Udacity
In total, 9,423 frames with 65,000 labels at 1920x1200 resolution.
make download
Resize image and generate mask images
make generate
Train Test Split
Make sure masks and bounding boxes
jupyter notebook "Visualization & Train Test Split.ipynb"
Train
# Train for 1 epochpython train.py
or
$ python train.py --help
usage: train.py [-h] [--epochs EPOCHS] [--batch-size BATCH_SIZE]
[--logdir LOGDIR] [--reg REG] [--ckdir CKDIR]
optional arguments:
-h, --help show this help message and exit
--epochs EPOCHS Number of epochs (default: 1)
--batch-size BATCH_SIZE
Batch size (default: 4)
--logdir LOGDIR Tensorboard log directory (default: logdir)
--reg REG L2 Regularizer Term (default: 0.1)
--ckdir CKDIR Checkpoint directory (default: models)
Test
jupyter notebook "./Test Run After Training.ipynb"