{"id":13497299,"url":"https://github.com/DeepSceneSeg/AdapNet","last_synced_at":"2025-03-28T21:32:23.247Z","repository":{"id":106374876,"uuid":"146880737","full_name":"DeepSceneSeg/AdapNet","owner":"DeepSceneSeg","description":"TensorFlow model for training AdapNet for semantic segmentation","archived":false,"fork":false,"pushed_at":"2019-06-30T16:08:01.000Z","size":5687,"stargazers_count":12,"open_issues_count":0,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-31T13:34:22.035Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://deepscene.cs.uni-freiburg.de","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeepSceneSeg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-08-31T11:01:30.000Z","updated_at":"2023-11-21T13:07:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"732ab1dd-2ad3-4101-ae78-3ec3da587440","html_url":"https://github.com/DeepSceneSeg/AdapNet","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/DeepSceneSeg%2FAdapNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSceneSeg%2FAdapNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSceneSeg%2FAdapNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeepSceneSeg%2FAdapNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeepSceneSeg","download_url":"https://codeload.github.com/DeepSceneSeg/AdapNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246105564,"owners_count":20724331,"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":[],"created_at":"2024-07-31T20:00:28.380Z","updated_at":"2025-03-28T21:32:22.539Z","avatar_url":"https://github.com/DeepSceneSeg.png","language":"Python","readme":"# AdapNet:  Adaptive  Semantic  Segmentation in  Adverse  Environmental  Conditions\nAdapNet is a deep learning model for semantic image segmentation, where the goal is to assign semantic labels (e.g., car, road, tree and so on) to every pixel in the input image. AdapNet is easily trainable on a single GPU with 12 GB of memory and has a fast inference time. AdapNet is benchmarked on Cityscapes, Synthia, ScanNet, SUN RGB-D and Freiburg Forest datasets.\n\nThis repository contains our TensorFlow implementation of AdapNet which allows you to train your own model on any dataset and evaluate the results in terms of the mean IoU metric.\n\nAdapnet can further be used with the [CMoDE](https://github.com/DeepSceneSeg/CMoDE) fusion scheme for multimodal semantic segmentation.\n\nIf you find the code useful for your research, please consider citing our paper:\n```\n@inproceedings{valada2017icra,\n  author = {Valada, Abhinav and Vertens, Johan and Dhall, Ankit and Burgard, Wolfram},\n  title = {AdapNet: Adaptive Semantic Segmentation in Adverse Environmental Conditions},\n  booktitle = {Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)},\n  pages={4644--4651},\n  year = {2017},\n  organization={IEEE}\n}\n```\n\n## Live Demo\nhttp://deepscene.cs.uni-freiburg.de\n\n## Example Segmentation Results\n\n| Dataset       | RGB_Image     | Segmented_Image|\n| ------------- | ------------- | -------------  |\n| Cityscapes    |\u003cimg src=\"images/city.png\" width=300\u003e |  \u003cimg src=\"images/city_v1.png\" width=300\u003e|\n| Forest  | \u003cimg src=\"images/forest.png\" width=300\u003e  |\u003cimg src=\"images/forest_v1.png\" width=300\u003e |\n| Sun RGB-D  | \u003cimg src=\"images/sun.png\" width=300\u003e  | \u003cimg src=\"images/sun_p.png\" width=300\u003e|\n| Synthia  | \u003cimg src=\"images/synthia.png\" width=300\u003e  | \u003cimg src=\"images/synthia_v1.png\" width=300\u003e |\n| ScanNet v2  | \u003cimg src=\"images/scannet.png\" width=300\u003e  |\u003cimg src=\"images/scannet_pr.png\" width=300\u003e |\n\n## Contacts\n* [Abhinav Valada](http://www2.informatik.uni-freiburg.de/~valada/)\n* [Rohit Mohan](https://github.com/mohan1914)\n\n## System Requirements\n\n#### Programming Language\n```\nPython 2.7\n```\n\n#### Python Packages\n```\ntensorflow-gpu 1.4.0\n```\n\n## Configure the Network\n\nDownload the resnet_v1_50 tensorflow pre-trained model for network intialization from [here](https://github.com/tensorflow/models/tree/master/research/slim).\n\n#### Data\n\n* Augment the training data.\n  In our work, we first resized the images in the dataset to 768x384 pixels and then apply a series of augmentations (random_flip, random_scale and random_crop).\n\n* Convert the training data (augmented), test data and validation data into the .tfrecords format.\n  Create a .txt file for each set having entries in the following format:\n  ```\n     path_to_modality1/0.png path_to_label/0.png\n     path_to_modality1/1.png path_to_label/1.png\n     path_to_modality1/2.png path_to_label/2.png\n     ...\n  ```\n  Run the convert_to_tfrecords.py from dataset folder for each of the train, test, val sets to create the tfrecords and the mean '.npy' file. The mean file should be only created for the train set.\n  ```\n     python convert_to_tfrecords.py --file path_to_.txt_file --record tf_records_name.tfrecords --mean True\n  ```\n  (Input to the model is in BGR and 'NHWC' form)\n\n#### Training Params\n```\n    gpu_id: id of gpu to be used\n    model: name of the model\n    num_classes: number of classes\n    intialize:  path to pre-trained model\n    checkpoint: path to save model\n    train_data: path to dataset .tfrecords\n    batch_size: training batch size\n    skip_step: how many steps to print loss \n    height: height of input image\n    width: width of input image\n    max_iteration: how many iterations to train\n    learning_rate: initial learning rate\n    save_step: how many steps to save the model\n    power: parameter for poly learning rate\n    mean: path to mean file \n```\n\n#### Evaluation Params\n```\n    gpu_id: id of gpu to be used\n    model: name of the model\n    num_classes: number of classes\n    checkpoint: path to saved model\n    test_data: path to dataset .tfrecords\n    batch_size: evaluation batch size\n    skip_step: how many steps to print mIoU\n    height: height of input image\n    width: width of input image\n    mean: path to mean file \n```\n\n## Training and Evaluation\n\n#### Training Procedure\nEdit the config file for training in config folder.\nRun:\n```\npython train.py -c config cityscapes_train.config or python train.py --config cityscapes_train.config\n```\n\n#### Evaluation Procedure\n\nSelect a checkpoint to test/validate your model in terms of the mean IoU metric.\nEdit the config file for evaluation in config folder. Run:\n```\npython evaluate.py -c config cityscapes_test.config or python evaluate.py --config cityscapes_test.config\n```\n\n## Additional Notes:\n   * We only provide the single scale evaluation script. Multi-Scale+Flip evaluation further imporves the performance of the model.\n   * The code in this repository only performs training on a single GPU. Multi-GPU training using synchronized batch normalization with larger batch size further improves the performance of the model.\n   * Initializing the model with pre-trained weights from large datasets such as the Mapillary Vistas and BDD100K yields an improved performance. \n   \n## License\nFor academic usage, the code is released under the [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) license. For any commercial purpose, please contact the authors.\n","funding_links":[],"categories":["SemanticSeg"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeepSceneSeg%2FAdapNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDeepSceneSeg%2FAdapNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDeepSceneSeg%2FAdapNet/lists"}