Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kkweon/unet-in-tensorflow
U-Net implementation in Tensorflow
https://github.com/kkweon/unet-in-tensorflow
Last synced: 21 days ago
JSON representation
U-Net implementation in Tensorflow
- Host: GitHub
- URL: https://github.com/kkweon/unet-in-tensorflow
- Owner: kkweon
- License: mit
- Created: 2017-05-18T01:46:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-09T20:45:27.000Z (almost 7 years ago)
- Last Synced: 2024-12-10T02:10:23.682Z (about 1 month ago)
- Language: Jupyter Notebook
- Size: 17.9 MB
- Stars: 195
- Watchers: 13
- Forks: 83
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# U-Net Implementation in TensorFlow
Re implementation of U-Net in Tensorflow
- to check how image segmentations can be used for detection problemsOriginal Paper
- [U-Net: Convolutional Networks for Biomedical Image Segmentation](https://arxiv.org/abs/1505.04597)## Summary
Vehicle Detection using U-Net
Objective: detect vehicles
Find a function f such that y = f(X)
Input
Shape
Explanation
Example
X: 3-D Tensor
(640, 960, 3)
RGB image in an array
y: 3-D Tensor
(640, 960, 1)
Binarized image. Bacground is 0
vehicle is masked as 255
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](https://github.com/udacity/self-driving-car/tree/master/annotations)
- In total, 9,423 frames with 65,000 labels at 1920x1200 resolution.```bash
make download
```### Resize image and generate mask images
- [utils/data.py](./utils/data.py) is used to resize images and generate masks
```bash
make generate
```### Train Test Split
Make sure masks and bounding boxes
```bash
jupyter notebook "Visualization & Train Test Split.ipynb"
```### Train
```bash
# Train for 1 epoch
python train.py
```or
```bash
$ 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
- Open the Jupyter notebook file to run against test data
```bash
jupyter notebook "./Test Run After Training.ipynb"
```