{"id":13535545,"url":"https://github.com/fidler-lab/curve-gcn","last_synced_at":"2026-01-27T01:32:32.381Z","repository":{"id":50309585,"uuid":"174869895","full_name":"fidler-lab/curve-gcn","owner":"fidler-lab","description":"Official PyTorch code for Curve-GCN (CVPR 2019)","archived":false,"fork":false,"pushed_at":"2020-01-29T20:33:06.000Z","size":252,"stargazers_count":843,"open_issues_count":11,"forks_count":134,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-03-11T03:55:53.194Z","etag":null,"topics":[],"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}},"created_at":"2019-03-10T19:21:55.000Z","updated_at":"2025-02-27T02:26:55.000Z","dependencies_parsed_at":"2022-09-05T16:41:11.491Z","dependency_job_id":null,"html_url":"https://github.com/fidler-lab/curve-gcn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fidler-lab/curve-gcn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fcurve-gcn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fcurve-gcn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fcurve-gcn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fcurve-gcn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fidler-lab","download_url":"https://codeload.github.com/fidler-lab/curve-gcn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fidler-lab%2Fcurve-gcn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08-01T08:00:58.088Z","updated_at":"2026-01-27T01:32:32.352Z","avatar_url":"https://github.com/fidler-lab.png","language":null,"funding_links":[],"categories":["Toolbox","Image Segmentation:","Others"],"sub_categories":["Label tools"],"readme":"# Curve-GCN\n\nThis is the official PyTorch implementation of Curve-GCN (CVPR 2019). This repository allows you to train new Curve-GCN models. For technical details, please refer to:  \n----------------------- ------------------------------------\n**Fast Interactive Object Annotation with Curve-GCN**  \n[Huan Ling](http:///www.cs.toronto.edu/~linghuan/)\\* \u003csup\u003e1,2\u003c/sup\u003e, [Jun Gao](http://www.cs.toronto.edu/~jungao/)\\* \u003csup\u003e1,2\u003c/sup\u003e, [Amlan Kar](http://www.cs.toronto.edu/~amlan/)\u003csup\u003e1,2\u003c/sup\u003e, [Wenzheng Chen](http://www.cs.toronto.edu/~wenzheng/)\u003csup\u003e1,2\u003c/sup\u003e, [Sanja Fidler](http://www.cs.toronto.edu/~fidler/)\u003csup\u003e1,2,3\u003c/sup\u003e   \n\u003csup\u003e1\u003c/sup\u003e University of Toronto  \u003csup\u003e2\u003c/sup\u003e Vector Institute \u003csup\u003e3\u003c/sup\u003e NVIDIA  \n**[[Paper](https://arxiv.org/pdf/1903.06874.pdf)] [[Video](https://youtu.be/ycD2BtO-QzU)] [[Demo Coming Soon]()] [[Supplementary](http://www.cs.toronto.edu/~linghuan/notes/supplementary_curvegcn.pdf)]**\n\n**CVPR 2019**\n\n\u003cimg src = \"docs/model.png\" width=\"56%\"/\u003e\n\n*Manually labeling objects by tracing their boundaries is\na laborious process. In Polyrnn, the authors proposed Polygon-\nRNN that produces polygonal annotations in a recurrent\nmanner using a CNN-RNN architecture, allowing interactive\ncorrection via humans-in-the-loop. We propose a new framework\nthat alleviates the sequential nature of Polygon-RNN,\nby predicting all vertices simultaneously using a Graph Convolutional\nNetwork (GCN). Our model is trained end-to-end,\nand runs in real time. It supports object annotation by either\npolygons or splines, facilitating labeling efficiency for both\nline-based and curved objects. We show that Curve-GCN outperforms\nall existing approaches in automatic mode, including\nthe powerful PSP-DeepLab and is significantly\nmore efficient in interactive mode than Polygon-RNN++.\nOur model runs at 29.3ms in automatic, and 2.6ms in interactive\nmode, making it 10x and 100x faster than Polygon-\nRNN++.*  \n(\\* denotes equal contribution)    \n----------------------- ------------------------------------\n\n\n\n# Where is the code?\nTo get the code, please [signup](http://www.cs.toronto.edu/annotation/curvegcn/code_signup/) here. We also provide the [dataloader](https://github.com/fidler-lab/curve-gcn/tree/dataloader). 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\nIf you use this code, please cite:\n\n    @inproceedings{CurveGCN2019,\n    title={Fast Interactive Object Annotation with Curve-GCN},\n    author={Huan Ling and Jun Gao and Amlan Kar and Wenzheng Chen and Sanja Fidler},\n    booktitle={CVPR},\n    year={2019}\n    }\n\n\n# License\n\nThis work is licensed under a *GNU GENERAL PUBLIC LICENSE Version 3* License.\n\n\n# Environment Setup\nAll the code has been run and tested on Ubuntu 16.04, Python 2.7.12, Pytorch 0.4.1, CUDA 9.0, TITAN X/Xp and GTX 1080Ti GPUs\n\n- Go into the downloaded code directory\n```\ncd \u003cpath_to_downloaded_directory\u003e\n```\n- Setup python environment\n```\nvirtualenv env\nsource env/bin/activate\npip install -r requirements.txt\n```\n- Add the project to PYTHONPATH  \n```\nexport PYTHONPATH=$PWD\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- Our processed annotation files are included in the download file you get after signing up\n- From the root directory, run the following command with appropriate paths to get the annotation files ready for your machine\n```\npython Scripts/data/change_paths.py --city_dir \u003cpath_to_downloaded_leftImg8bit_folder\u003e --json_dir \u003cpath_to_downloaded_annotation_file\u003e --out_dir \u003coutput_dir\u003e\n```\n\n## Training\n\n- Download the pre-trained Pytorch Resnet-50 from [here](https://download.pytorch.org/models/resnet50-19c8e357.pth)\n\n### Train Spline GCN\n\n- Modify \"exp\\_dir\", \"encoder\\_reload\", \"data\\_dir\" attributes at Experiments/gnn-active-spline.json\n- Run script:\n```\npython Scripts/train/train_gnn_active_spline.py --exp Experiments/gnn-active-spline.json\n```\n\nCheckpoint to reproduce numbers from the paper is available at \"checkpoints/Spline_GCN_epoch8_step21000.pth\"\n\n\n### Finetune Spline GCN with Differentiable Rendering\n- Modify \"exp\\_dir\", \"encoder\\_reload\", \"data\\_dir\" attributes at Experiments/gnn-active-spline.json\n- Modify \"xe\\_initializer\" to be the best checkpoint from the last step. \n- Run script:\n```\npython Scripts/train/train_gnn_active_spline_diffrender.py --exp Experiments/gnn-active-spline-diff-render.json\n```\n\nCheckpoint to reproduce numbers from the paper is available at \"checkpoints/Spline_GCN_diffrender_epoch6_step18000.pth\"\n\n\n## Prediction\nGenerate prediction masks:  \n```\npython Scripts/prediction/generate_annotation_from_active_spline.py --exp \u003cpath to exp file\u003e --output_dir \u003cpath to output dir\u003e --reload \u003cpath to checkpoint\u003e \n```\n\nCalculate IOU:  \n```\npython Scripts/get_scores.py --pred \u003cpath to output dir\u003e --output  \u003cpath to output txt file\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidler-lab%2Fcurve-gcn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffidler-lab%2Fcurve-gcn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffidler-lab%2Fcurve-gcn/lists"}