{"id":13578821,"url":"https://github.com/nicolov/segmentation_keras","last_synced_at":"2025-04-05T19:33:54.055Z","repository":{"id":87927571,"uuid":"74410605","full_name":"nicolov/segmentation_keras","owner":"nicolov","description":"DilatedNet in Keras for image segmentation","archived":false,"fork":false,"pushed_at":"2019-01-05T15:01:43.000Z","size":162,"stargazers_count":301,"open_issues_count":5,"forks_count":92,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-05T16:49:12.052Z","etag":null,"topics":["caffe","deeplearning","keras","segmentation","tensorflow"],"latest_commit_sha":null,"homepage":null,"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/nicolov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-11-21T22:15:04.000Z","updated_at":"2024-06-25T22:24:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"66cbecf2-0441-4ba3-a588-0237469224af","html_url":"https://github.com/nicolov/segmentation_keras","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolov%2Fsegmentation_keras","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolov%2Fsegmentation_keras/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolov%2Fsegmentation_keras/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolov%2Fsegmentation_keras/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolov","download_url":"https://codeload.github.com/nicolov/segmentation_keras/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393095,"owners_count":20931804,"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":["caffe","deeplearning","keras","segmentation","tensorflow"],"created_at":"2024-08-01T15:01:34.074Z","updated_at":"2025-04-05T19:33:53.655Z","avatar_url":"https://github.com/nicolov.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Keras implementation of DilatedNet for semantic segmentation\n============================================================\n\n\u003cdiv style=\"text-align: center\" /\u003e\n\u003cimg src=\"http://nicolovaligi.com/cat.jpg\" style=\"max-width: 500px\" /\u003e\n\u003c/div\u003e\n\n\nA native Keras implementation of semantic segmentation according to\n*Multi-Scale Context Aggregation by Dilated Convolutions (2016)*. Optionally uses the pretrained weights by the\n[authors'](https://github.com/fyu/dilation).\n\nThe code has been tested on Tensorflow 1.3, Keras 1.2, and Python 3.6.\n\n\nUsing the pretrained model\n----------------\n\nDownload and extract the pretrained model:\n\n    curl -L https://github.com/nicolov/segmentation_keras/releases/download/model/nicolov_segmentation_model.tar.gz | tar xvf -\n\nInstall dependencies and run:\n\n```\npip install -r requirements.txt\n# For GPU support\npip install tensorflow-gpu==1.3.0\n\npython predict.py --weights_path conversion/converted/dilation8_pascal_voc.npy\n```\n\nThe output image will be under `images/cat_seg.png`.\n\n\nConverting the original Caffe model\n-----------------------------------\n\nFollow the instructions in the `conversion` folder to convert the weights to the TensorFlow\nformat that can be used by Keras.\n\n\nTraining\n--------\n\nDownload the *Augmented Pascal VOC* dataset\n[here](http://home.bharathh.info/pubs/codes/SBD/download.html):\n\n    curl -L http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz | tar -xvf -\n\nThis will create a `benchmark_RELEASE` directory in the root of the repo.\nUse the `convert_masks.py` script to convert the provided masks in *.mat* format to RGB pngs:\n\n    python convert_masks.py \\\n        --in-dir benchmark_RELEASE/dataset/cls \\\n        --out-dir benchmark_RELEASE/dataset/pngs\n\nStart training:\n\n    python train.py --batch-size 2\n\nModel checkpoints are saved under `trained/`, and can be used with the `predict.py` script for testing.\n\nThe training code is currently limited to the *frontend* module,\nand thus only outputs 16x16 segmentation maps. The augmentation\npipeline does mirroring but not cropping or rotation.\n\n\u003chr\u003e\n\n*Fisher Yu and Vladlen Koltun, Multi-Scale Context Aggregation by Dilated Convolutions, 2016*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolov%2Fsegmentation_keras","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolov%2Fsegmentation_keras","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolov%2Fsegmentation_keras/lists"}