-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:MarvinTeichmann/KittiSeg
- Loading branch information
Showing
1 changed file
with
19 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,11 @@ | |
|
||
KittiSeg trains an FCN based model for Segmentation of Roads on the Kitti road detection dataset. The model achieved [first place](http://www.cvlibs.net/datasets/kitti/eval_road_detail.php?result=ca96b8137feb7a636f3d774c408b1243d8a6e0df) on the Benchmark at submission time and is descripted in our paper: [MultiNet](https://arxiv.org/abs/1612.07695). | ||
|
||
![](https://i.imgur.com/Usi1XhE.png) | ||
|
||
Output of KittiSeg drawn as a green overlay. | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
The model is optimized to perform well even with very few data samples avaible. The implementation is trained on just *250* images and receives a state-of-the art MaxF1 score of over *96%*. It's inference time is less then *95ms*. | ||
|
||
|
||
|
||
![](https://i.imgur.com/Usi1XhE.png) | ||
|
||
The code contains for `train`, `evaluate` and `visualize` semantic segmentation in tensorflow. It is build to be compatible with the [TensorVision](http://tensorvision.readthedocs.io/en/master/user/tutorial.html#workflow) backend which allows to organize experiments in a very clean way. | ||
|
||
|
@@ -34,7 +25,7 @@ Those modules can be installed using: `pip install numpy scipy pillow matplotlib | |
|
||
1. Clone this repository: `git clone [email protected]:MarvinTeichmann/KittiSeg.git` | ||
2. Initialize all submodules: `git submodule update --init --recursive` | ||
3. Retrieve kitti data url here: `http://www.cvlibs.net/download.php?file=data_road.zip` | ||
3. Retrieve kitti data url here: [http://www.cvlibs.net/download.php?file=data_road.zip](http://www.cvlibs.net/download.php?file=data_road.zip) | ||
4. Call `python download_data.py --kitti_url URL_YOU_RETRIEVED` | ||
|
||
I strongly recommand to exececute step 4. instead of downloading the data yourself. The script will also prepare the data to be in the right input format and check whether the right data is downloaded. | ||
|
@@ -46,9 +37,9 @@ I strongly recommand to exececute step 4. instead of downloading the data yourse | |
|
||
### Getting started | ||
|
||
Run: `python evaluate.py` to evaluate a trained model. This will also download the Kitti Data and model weights, if nessasary. | ||
Run: `python evaluate.py` to evaluate a trained model. | ||
|
||
Run: `python train.py` to train a new model on the Kitti Data. This will also download the Kitti Data if nessasary. | ||
Run: `python train.py` to train a new model on the Kitti Data. | ||
|
||
### Modifying Model & Train on your own data | ||
|
||
|
@@ -78,9 +69,7 @@ Those modules operate independently. This allows easy experiments with different | |
By default, the data is stored in the folder `KittiSeg/DATA` and the output of runs in `KittiSeg/RUNS`. This behaviour can be changed by adjusting the environoment Variabels: `$TV_DIR_DATA` and `$TV_DIR_RUNS`. | ||
|
||
For organizing your experiments you can use: | ||
`python train.py --project batch_size_bench --name size_5` | ||
|
||
This will store the run in the subfolder: `$TV_DIR_RUNS/batch_size_bench/size_5_%DATE` | ||
`python train.py --project batch_size_bench --name size_5`. This will store the run in the subfolder: `$TV_DIR_RUNS/batch_size_bench/size_5_%DATE` | ||
|
||
This is useful if you want to run different series of experiments. | ||
|
||
|
@@ -92,31 +81,31 @@ KittiSeg is build on top of the TensorVision [TensorVision](https://github.com/T | |
|
||
To utilize the entire TensorVision functionality install it using | ||
|
||
`$ cd KittiSeg/submodules/TensorVision` | ||
`$ cd KittiSeg/submodules/TensorVision` <br> | ||
`$ python setup install` | ||
|
||
Now you can use the TensorVision command line tools, which includes: | ||
|
||
`tv-train --hypes hypes/KittiSeg.json` trains a json model. | ||
`tv-continue --logdir PATH/TO/RUNDIR` continues interrupted training | ||
`tv-analyze --logdir PATH/TO/RUNDIR` evaluated trained model | ||
`tv-train --hypes hypes/KittiSeg.json` trains a json model. <br> | ||
`tv-continue --logdir PATH/TO/RUNDIR` continues interrupted training <br> | ||
`tv-analyze --logdir PATH/TO/RUNDIR` evaluated trained model <br> | ||
|
||
|
||
## Useful Flags & Variabels | ||
|
||
Here are some Flags which will be useful when working with KittiSeg and TensorVision. All flags are avaible across all scripts. | ||
|
||
`--hypes` : specify which hype-file to use | ||
`--logdir` : specify which logdir to use | ||
`--gpus` : specify on which GPUs to run the code | ||
`--name` : assign a name to the run | ||
`--project` : assign a project to the run | ||
`--nosave` : debug run, logdir will be set to `debug` | ||
`--hypes` : specify which hype-file to use <br> | ||
`--logdir` : specify which logdir to use <br> | ||
`--gpus` : specify on which GPUs to run the code <br> | ||
`--name` : assign a name to the run <br> | ||
`--project` : assign a project to the run <br> | ||
`--nosave` : debug run, logdir will be set to `debug` <br> | ||
|
||
In addition the following TensorVision environoment Variables will be useful: | ||
|
||
`$TV_DIR_DATA`: specify meta directory for data | ||
`$TV_DIR_RUNS`: specify meta directiry for output | ||
`$TV_USE_GPUS`: specify default GPU behavour. | ||
`$TV_DIR_DATA`: specify meta directory for data <br> | ||
`$TV_DIR_RUNS`: specify meta directiry for output <br> | ||
`$TV_USE_GPUS`: specify default GPU behavour. <br> | ||
|
||
On a cluster it is useful to set `$TV_USE_GPUS=force`. This will make the flag `--gpus` manditory and ensure, that run will be executed on the right gpu. | ||
On a cluster it is useful to set `$TV_USE_GPUS=force`. This will make the flag `--gpus` manditory and ensure, that run will be executed on the right gpu. |