{"id":26142458,"url":"https://github.com/fidler-lab/delse","last_synced_at":"2026-03-15T03:01:14.554Z","repository":{"id":76707760,"uuid":"208898670","full_name":"fidler-lab/delse","owner":"fidler-lab","description":"PyTorch code for Deep Extreme Level Set Evolution (CVPR 2019)","archived":false,"fork":false,"pushed_at":"2024-06-11T16:24:14.000Z","size":1714,"stargazers_count":69,"open_issues_count":1,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-14T02:06:31.457Z","etag":null,"topics":["annotation","cvpr2019","labelling","pytorch"],"latest_commit_sha":null,"homepage":"","language":null,"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/fidler-lab.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-09-16T21:10:35.000Z","updated_at":"2024-06-11T16:24:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"93b03600-2764-407b-b11e-2ceb98c70277","html_url":"https://github.com/fidler-lab/delse","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/fidler-lab%2Fdelse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fdelse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fdelse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fdelse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fidler-lab","download_url":"https://codeload.github.com/fidler-lab/delse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248809043,"owners_count":21164896,"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":["annotation","cvpr2019","labelling","pytorch"],"created_at":"2025-03-11T03:55:55.402Z","updated_at":"2026-03-15T03:01:14.462Z","avatar_url":"https://github.com/fidler-lab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deep Extreme Level Set Evolution (DELSE)\n\nThis is the PyTorch implementation of DELSE model for object instance segmentation. This repository provides code to train and evaluate with DELSE. For details, please refer to:  \n\n**Object Instance Annotation with Deep Extreme Level Set Evolution**  \n[Zian Wang](http://www.cs.toronto.edu/~zianwang/), [David Acuna](http://www.cs.toronto.edu/~davidj/)\\*, [Huan Ling](http://www.cs.toronto.edu/~linghuan/)\\*, [Amlan Kar](http://www.cs.toronto.edu/~amlan/), [Sanja Fidler](https://www.cs.utoronto.ca/~fidler/)\n\n**[[Project Page](http://www.cs.toronto.edu/~zianwang/DELSE/delse.html)][[Paper](http://www.cs.toronto.edu/~zianwang/DELSE/zian19delse.pdf)] [[Poster](http://www.cs.toronto.edu/~zianwang/DELSE/poster.pdf)][[bibtex](http://www.cs.toronto.edu/~zianwang/DELSE/bibtex.txt)]**  \n\n**CVPR 2019**\n\n\u003cimg src = \"docs/model.png\" width=\"80%\"/\u003e\n\n\u003c!--\n*We revive the old ideas on level set segmentation which framed object annotation as curve evolution. The Level Set Method can handle objects with complex shapes and topological changes such as merging and splitting, thus able to deal with occluded objects and objects with holes. We propose Deep Extreme Level Set Evolution (DELSE) that combines powerful CNN models with level set optimization in an end-to-end fashion. Our method learns to predict evolution parameters conditioned on the image and evolves the predicted initial contour to produce the final result. Carefully designed energy functions ensured that the curve was well aligned with image boundaries, and generally \"well behaved\". Our model is interactive by incorporating user clicks on the extreme boundary points and allows further correction on erroneous boundary.*   \n(\\* denotes equal contribution)    \n----------------------- ------------------------------------\n--\u003e\n\n## Where is the code?\n~~To get the code, please sign up [here](http://www.cs.toronto.edu/delse/code_signup/). We will be using GitHub to keep track of issues with the code and to update on availability of newer versions (also available on website and through e-mail to signed up users).~~\n\nThe code sign-up server was down. Please contact zianwang@cs.toronto.edu for access. \n\nIf you find this code helpful, please consider citing \n\n\t@inproceedings{DELSE2019,\n\ttitle={Object Instance Annotation with Deep Extreme Level Set Evolution},\n\tauthor={Zian Wang and David Acuna and Huan Ling and Amlan Kar and Sanja Fidler},\n\tbooktitle={CVPR},\n\tyear={2019}\n\t}\n\n\n## Installation\nThe code was tested with Anaconda (Python 3.6) and PyTorch 0.4.1. \n\n1. Install dependencies:\n\n    ```\n    conda install pytorch torchvision -c pytorch\n    conda install matplotlib opencv pillow scikit-image\n    pip install tensorboard tensorboardx\n    ```\n  \n2. Download the pre-trained PSPNet model. \n\n    ```Shell\n    cd models/\n    chmod +x download_pretrained_psp_model.sh\n    ./download_pretrained_psp_model.sh\n    ```\n\n3. Set the paths in ```mypath.py```, so that they point to the appropriate locations of PASCAL/SBD/DAVIS/CityScapes dataset.\n\n\n\n## Data \n\n### Cityscapes\n- Download the Cityscapes dataset (leftImg8bit\\_trainvaltest.zip) from the official [website](https://www.cityscapes-dataset.com/downloads/) [11 GB]\n- Download our processed annotation files from [here](http://www.cs.toronto.edu/~amlan/data/polygon/cityscapes.tar.gz) [68 MB]\n- From the root directory, run the following command with appropriate paths to get the annotation files ready for your machine\n```\npython dataloaders/change_paths.py --city_dir \u003cpath_to_downloaded_leftImg8bit_folder\u003e --json_dir \u003cpath_to_downloaded_annotation_file\u003e --output_dir \u003coutput_dir\u003e\n```\n- Set the path in mypath.py to the location of CityScapes dataset.\n\n\n## Scripts\n\n\n\n### Project Structure\n\n```\n.\n├── networks        \t\t\t\t# backend CNN modules\n|   └── ...       \t\t\n├── layers           \t\t\t# loss and level set evolution mechanism\n|   └── ...\n├── dataloaders           \t\t\t# thank DEXTR and PolyRNN for loaders\n|   ├── cityscapes.py       \t\t\n|   ├── davis.py        \t\t\t\n|   ├── pascal.py    \t\t\t\t\n|   ├── sbd.py    \t\t\t\t\t\n|   ├── custom_transforms.py    \t# transforms for data\n|   ├── helpers.py    \t\t\t# helper functions used in data processing\n|   └── ...\n├── models\t\t\t\t# deeplab pretrained model\n|   └── ...\n├── evaluation\t\t\t\t\t\t\n|   └── eval.py\t\t\t\t# function for eval\n|\n├── DELSE.py       \t\t\t# model\n├── mypath.py     \t\t\t# path for datasets\n├── eval_multi.py     \t\t\t# run multi evaluation \n└── main.py        \t\t\t# training and testing\n\n```\n\n\n### Training\n\nRun ```python main.py``` for training. The default argparse parameters is for Cityscapes. \nThe parameters of settings are in main.py. \n\n### Evaluation\nSet the index of experiments and evaluation settings in eval\\_multi.py (Line 14-18 in function param\\_generateor). \nRun ```python eval_multi.py``` for evaluation on your predicted results. \n\nThe model ckeckpoint on Cityscapes dataset can be found [here](http://www.cs.toronto.edu/~zianwang/share/delse/cityscapes_ckpt.pth). If the intermediate outputs are not saved, please get the inference outputs first with the test function in DELSE.py. \n\n\n-----------------------------------------------------------\n\n\n\nIf you have questions with this code, please contact zianwang@cs.toronto.edu.\nWe would like to thank [DEXTR](https://github.com/scaelles/DEXTR-PyTorch) for releasing their code. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidler-lab%2Fdelse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffidler-lab%2Fdelse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidler-lab%2Fdelse/lists"}