{"id":13857119,"url":"https://github.com/mathildor/TF-SegNet","last_synced_at":"2025-07-13T20:30:46.714Z","repository":{"id":78841024,"uuid":"84102192","full_name":"mathildor/TF-SegNet","owner":"mathildor","description":"SegNet-like network implemented in TensorFlow to use for segmenting aerial images","archived":false,"fork":false,"pushed_at":"2018-10-08T14:27:07.000Z","size":7065,"stargazers_count":100,"open_issues_count":5,"forks_count":32,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-08-06T03:03:19.027Z","etag":null,"topics":["image-segmentation","machine-learning","segnet","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathildor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-06T17:36:42.000Z","updated_at":"2024-04-21T07:22:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"f984239d-d91b-4c4d-8f56-55b9bf8f479e","html_url":"https://github.com/mathildor/TF-SegNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathildor%2FTF-SegNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathildor%2FTF-SegNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathildor%2FTF-SegNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathildor%2FTF-SegNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathildor","download_url":"https://codeload.github.com/mathildor/TF-SegNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225912596,"owners_count":17544210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-segmentation","machine-learning","segnet","tensorflow"],"created_at":"2024-08-05T03:01:26.464Z","updated_at":"2024-11-22T14:32:05.639Z","avatar_url":"https://github.com/mathildor.png","language":"Python","funding_links":[],"categories":["Python","Deep Learning"],"sub_categories":[],"readme":"# SegNet --\u003e AirNet\nAirNet is a segmentation network based on [SegNet](https://mi.eng.cam.ac.uk/projects/segnet/), but with some modifications. The goal is to use the model to segment multispectral images, so that geographical information (e.g. building information) can be extracted. The model is implemented in [Tensorflow](https://www.tensorflow.org/).\n\n## Recognition\n- SegNet implementation by tkuanlan35: https://github.com/tkuanlun350/Tensorflow-SegNet.\n- Unraveling method from mshunshin: https://github.com/mshunshin/SegNetCMR/blob/master/SegNetCMR/layers.py\n\n\n## Architecture\n*NB! If you are unfamiliar with how convolutional neural networks work, I have written a [blogpost](https://geoit.geoforum.no/2017/12/20/maskinlaering-flyfoto/) that explains the basic concepts.*\n\nI've implemented four different version of the models:\n- [AirNet-basic](#AirNet-basic)\n- [AirNet-basic-dropout](#AirNet-Basic-dropout)\n- [AirNet-extended](#AirNet-Extended)\n- [AirNet-extended-dropout](#AirNet-Extended-dropout)\n\nAll the AirNet models have:\n- an encoder-decoder structure with different number of layers for the different versions\n- batch normalization with a moving avarage decay of 0.99\n- usampling layers that use pooling indices from the maxpool in the encoder. The positions for the original pixels that are kept during maxpooling in the encoder is saved, and used in the decoder to place the pixels back to their original positions.\n\n![Airnet extended architecture](docs/arch.PNG)\n\n\n### Optimizers and initializers\nDifferent optimizers and initializers have been tested on each of the models. The ones that were tested are listed below, and the ones that was chosen based on performance is given in the model description.\n\n#### Optimizers:\n- Stochastic gradient descent\n- Adam\n- Adagrad\n- Momentum\n#### Weight initializers:\n- Variance scale\n- Xavier\n\n### AirNet Basic\n- Four encoders and four decoders\n- Stochastic gradient descent optimizer\n- Xavier initializer\n\n\u003cimg src=\"docs/Basic.png\" title=\"AirNet basic architecture\" width=\"400px\"/\u003e\n\n### AirNet Basic dropout\nSame architecture as Basic, except for dropoutlayers that are added after the pooling layers, with a dropout rate of 0.5.\n\n\n### AirNet Extended\nThe extended model is much larger and has 5 encoders and 5 decoders. It takes longer time to train, it is slower during inference, but achieves higher performance when trained sufficiently.\n\n- Five encoder and decoders\n- Adagrad optimizer\n- Variance scale weight initializer\n\n\u003cimg src=\"docs/Extended.png\" title=\"AirNet extended architecture\" width=\"600px\"/\u003e\n\n### AirNet Extended dropout\nSame architecture as Extended, except for dropoutlayers that are added after the pooling layers, with a dropout rate of 0.5.\n\n\n\u003cimg src=\"docs/Extended-dropout.png\" title=\"AirNet extended dropout architecture\"/\u003e\n\n## Usage\n### Requirements\n\n- Tensorflow GPU 1.3.0\n- Python 3.5\n\n`pip install -r AirNet/requirements.txt`\n\n\n### Run TensorBoard:\ntensorboard --logdir=path/to/log-directory\n\n\n## Dataset\nTo verify the model I used the CamVid dataset. This can be downloaded from: https://github.com/alexgkendall/SegNet-Tutorial, and used in the model by setting the correct paths and dataset size in [AirNet/\\__init__.py](https://github.com/Norkart/autoKart/blob/master/AirNet/__init__.py)\n\nThe datasets of aerial images used to train and test the model is constructed through an automatic mapping of vector data and aerial images of Norway. Both a dataset with IR images, and with RGB images was constructed, both containing around 4500 images. The data is unfortunately not open source.\n\n![Example dataset](docs/dataset-example.PNG)\n\n\n\n## Results\nThe IR images gave a small increase in performance, and examples of the segmentation can be seen here:\n\n\u003cimg src=\"docs/Example-result.png\" width=\"250\"/\u003e\n\u003cimg src=\"docs/Example-result-2.png\" width=\"250\"/\u003e\n\u003cimg src=\"docs/Example-result-3.png\" width=\"250\"/\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathildor%2FTF-SegNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathildor%2FTF-SegNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathildor%2FTF-SegNet/lists"}