{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/raster-vision/pulls/comments/237998403","pull_request_review_id":180419518,"id":237998403,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzk5ODQwMw==","diff_hunk":"@@ -64,27 +92,67 @@ def update_for_command(self,\n                 msg = 'No URI set for SemanticSegmentationRasterStoreConfig'\n                 io_def.add_missing(msg)\n \n+            for vo in self.vector_output:\n+                io_def.add_input(vo['uri'])\n+\n         return io_def\n \n \n class SemanticSegmentationRasterStoreConfigBuilder(LabelStoreConfigBuilder):\n     def __init__(self, prev=None):\n         config = {}\n         if prev:\n-            config = {'uri': prev.uri, 'rgb': prev.rgb}\n+            config = {\n+                'uri': prev.uri,\n+                'vector_output': prev.vector_output,\n+                'rgb': prev.rgb,\n+            }\n \n         super().__init__(SemanticSegmentationRasterStoreConfig, config)\n \n     def from_proto(self, msg):\n-        return self.with_uri(msg.semantic_segmentation_raster_store.uri) \\\n-                   .with_rgb(msg.semantic_segmentation_raster_store.rgb)\n+        uri = msg.semantic_segmentation_raster_store.uri\n+        rgb = msg.semantic_segmentation_raster_store.rgb\n+        vo = msg.semantic_segmentation_raster_store.vector_output\n+\n+        return self.with_uri(uri) \\\n+                   .with_vector_output(vo) \\\n+                   .with_rgb(rgb)\n \n     def with_uri(self, uri):\n         \"\"\"Set URI for a GeoTIFF used to read/write predictions.\"\"\"\n         b = deepcopy(self)\n         b.config['uri'] = uri\n         return b\n \n+    def with_vector_output(self, msg):\n+        \"\"\"Configure vector output for predictions.\n+\n+            Args:\n+                msg: Either a list of dictionaries or a protobuf","path":"rastervision/data/label_store/semantic_segmentation_raster_store_config.py","position":109,"original_position":109,"commit_id":"a3afcb8f86deba8a31489a483eb076f0cfb14ec2","original_commit_id":"a3afcb8f86deba8a31489a483eb076f0cfb14ec2","user":{"login":"lewfish","id":1896461,"node_id":"MDQ6VXNlcjE4OTY0NjE=","avatar_url":"https://avatars1.githubusercontent.com/u/1896461?v=4","gravatar_id":"","url":"https://api.github.com/users/lewfish","html_url":"https://github.com/lewfish","followers_url":"https://api.github.com/users/lewfish/followers","following_url":"https://api.github.com/users/lewfish/following{/other_user}","gists_url":"https://api.github.com/users/lewfish/gists{/gist_id}","starred_url":"https://api.github.com/users/lewfish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewfish/subscriptions","organizations_url":"https://api.github.com/users/lewfish/orgs","repos_url":"https://api.github.com/users/lewfish/repos","events_url":"https://api.github.com/users/lewfish/events{/privacy}","received_events_url":"https://api.github.com/users/lewfish/received_events","type":"User","site_admin":false},"body":"I'm pretty sure that none of the other `with` methods take protobuf messages as input (with the exception of with_class_map). I guess it doesn't hurt, but it doesn't seem very useful. I also think the name `config` is better than `msg` since it might be a dict . Also, I would add something to the validate method to check that the value of mode is valid.","created_at":"2018-11-30T20:50:55Z","updated_at":"2018-11-30T20:51:13Z","html_url":"https://github.com/azavea/raster-vision/pull/575#discussion_r237998403","pull_request_url":"https://api.github.com/repos/azavea/raster-vision/pulls/575","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/comments/237998403"},"html":{"href":"https://github.com/azavea/raster-vision/pull/575#discussion_r237998403"},"pull_request":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/575"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/raster-vision/pulls/575","id":233708718,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzA4NzE4","html_url":"https://github.com/azavea/raster-vision/pull/575","diff_url":"https://github.com/azavea/raster-vision/pull/575.diff","patch_url":"https://github.com/azavea/raster-vision/pull/575.patch","issue_url":"https://api.github.com/repos/azavea/raster-vision/issues/575","number":575,"state":"open","locked":false,"title":"Feature Extraction","user":{"login":"jamesmcclain","id":11281373,"node_id":"MDQ6VXNlcjExMjgxMzcz","avatar_url":"https://avatars1.githubusercontent.com/u/11281373?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesmcclain","html_url":"https://github.com/jamesmcclain","followers_url":"https://api.github.com/users/jamesmcclain/followers","following_url":"https://api.github.com/users/jamesmcclain/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcclain/subscriptions","organizations_url":"https://api.github.com/users/jamesmcclain/orgs","repos_url":"https://api.github.com/users/jamesmcclain/repos","events_url":"https://api.github.com/users/jamesmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcclain/received_events","type":"User","site_admin":false},"body":"## Overview\r\n\r\nAdds ability to produce a GeoJSON file containing semantic segmentation predictions.\r\n\r\nThe ProtoBuf schema has been updated to include a [list of vector outputs](https://github.com/azavea/raster-vision/pull/575/files#diff-ba58680523016964b2532a3779c09392).\r\n\r\nThe segmentation integration test gives the following results:\r\n\r\n![mask](https://user-images.githubusercontent.com/11281373/49242802-a9619e80-f3d9-11e8-9a2d-617576f77708.png)\r\n![screenshot from 2018-11-29 13-21-56](https://user-images.githubusercontent.com/11281373/49242884-e29a0e80-f3d9-11e8-8c21-8b77aceff969.png)\r\n\r\nEvaluation of vector outputs has been left for future work.\r\n\r\n### Checklist\r\n\r\n- [x] Ran scripts/format_code and commited any changes\r\n- [x] Documentation updated if needed\r\n- [x] PR has a name that won't get you publicly shamed for vagueness\r\n\r\n### Notes\r\n\r\nOptional. Ancillary topics, caveats, alternative strategies that didn't work out, anything else.\r\n\r\n## Testing Instructions\r\n\r\n* How to test this PR\r\n* Prefer bulleted description\r\n* Start after checking out this branch\r\n* Include any setup required, such as rebuilding the Docker image.\r\n* Include test case, and expected output if not captured by automated tests.\r\n\r\nCloses https://github.com/azavea/raster-vision/issues/544\r\n","created_at":"2018-11-26T21:52:19Z","updated_at":"2018-11-30T20:51:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"de19e20014a20e88e0e51f968d28d68d00f58a7c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":955751711,"node_id":"MDU6TGFiZWw5NTU3NTE3MTE=","url":"https://api.github.com/repos/azavea/raster-vision/labels/review","name":"review","color":"ededed","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/azavea/raster-vision/pulls/575/commits","review_comments_url":"https://api.github.com/repos/azavea/raster-vision/pulls/575/comments","review_comment_url":"https://api.github.com/repos/azavea/raster-vision/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/raster-vision/issues/575/comments","statuses_url":"https://api.github.com/repos/azavea/raster-vision/statuses/a3afcb8f86deba8a31489a483eb076f0cfb14ec2","head":{"label":"jamesmcclain:feature-extraction","ref":"feature-extraction","sha":"a3afcb8f86deba8a31489a483eb076f0cfb14ec2","user":{"login":"jamesmcclain","id":11281373,"node_id":"MDQ6VXNlcjExMjgxMzcz","avatar_url":"https://avatars1.githubusercontent.com/u/11281373?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesmcclain","html_url":"https://github.com/jamesmcclain","followers_url":"https://api.github.com/users/jamesmcclain/followers","following_url":"https://api.github.com/users/jamesmcclain/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcclain/subscriptions","organizations_url":"https://api.github.com/users/jamesmcclain/orgs","repos_url":"https://api.github.com/users/jamesmcclain/repos","events_url":"https://api.github.com/users/jamesmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcclain/received_events","type":"User","site_admin":false},"repo":{"id":139065799,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwNjU3OTk=","name":"raster-vision","full_name":"jamesmcclain/raster-vision","private":false,"owner":{"login":"jamesmcclain","id":11281373,"node_id":"MDQ6VXNlcjExMjgxMzcz","avatar_url":"https://avatars1.githubusercontent.com/u/11281373?v=4","gravatar_id":"","url":"https://api.github.com/users/jamesmcclain","html_url":"https://github.com/jamesmcclain","followers_url":"https://api.github.com/users/jamesmcclain/followers","following_url":"https://api.github.com/users/jamesmcclain/following{/other_user}","gists_url":"https://api.github.com/users/jamesmcclain/gists{/gist_id}","starred_url":"https://api.github.com/users/jamesmcclain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamesmcclain/subscriptions","organizations_url":"https://api.github.com/users/jamesmcclain/orgs","repos_url":"https://api.github.com/users/jamesmcclain/repos","events_url":"https://api.github.com/users/jamesmcclain/events{/privacy}","received_events_url":"https://api.github.com/users/jamesmcclain/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jamesmcclain/raster-vision","description":"deep learning for aerial/satellite imagery","fork":true,"url":"https://api.github.com/repos/jamesmcclain/raster-vision","forks_url":"https://api.github.com/repos/jamesmcclain/raster-vision/forks","keys_url":"https://api.github.com/repos/jamesmcclain/raster-vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamesmcclain/raster-vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamesmcclain/raster-vision/teams","hooks_url":"https://api.github.com/repos/jamesmcclain/raster-vision/hooks","issue_events_url":"https://api.github.com/repos/jamesmcclain/raster-vision/issues/events{/number}","events_url":"https://api.github.com/repos/jamesmcclain/raster-vision/events","assignees_url":"https://api.github.com/repos/jamesmcclain/raster-vision/assignees{/user}","branches_url":"https://api.github.com/repos/jamesmcclain/raster-vision/branches{/branch}","tags_url":"https://api.github.com/repos/jamesmcclain/raster-vision/tags","blobs_url":"https://api.github.com/repos/jamesmcclain/raster-vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamesmcclain/raster-vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamesmcclain/raster-vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamesmcclain/raster-vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamesmcclain/raster-vision/statuses/{sha}","languages_url":"https://api.github.com/repos/jamesmcclain/raster-vision/languages","stargazers_url":"https://api.github.com/repos/jamesmcclain/raster-vision/stargazers","contributors_url":"https://api.github.com/repos/jamesmcclain/raster-vision/contributors","subscribers_url":"https://api.github.com/repos/jamesmcclain/raster-vision/subscribers","subscription_url":"https://api.github.com/repos/jamesmcclain/raster-vision/subscription","commits_url":"https://api.github.com/repos/jamesmcclain/raster-vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamesmcclain/raster-vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamesmcclain/raster-vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamesmcclain/raster-vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamesmcclain/raster-vision/contents/{+path}","compare_url":"https://api.github.com/repos/jamesmcclain/raster-vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamesmcclain/raster-vision/merges","archive_url":"https://api.github.com/repos/jamesmcclain/raster-vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamesmcclain/raster-vision/downloads","issues_url":"https://api.github.com/repos/jamesmcclain/raster-vision/issues{/number}","pulls_url":"https://api.github.com/repos/jamesmcclain/raster-vision/pulls{/number}","milestones_url":"https://api.github.com/repos/jamesmcclain/raster-vision/milestones{/number}","notifications_url":"https://api.github.com/repos/jamesmcclain/raster-vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamesmcclain/raster-vision/labels{/name}","releases_url":"https://api.github.com/repos/jamesmcclain/raster-vision/releases{/id}","deployments_url":"https://api.github.com/repos/jamesmcclain/raster-vision/deployments","created_at":"2018-06-28T20:35:33Z","updated_at":"2018-11-30T20:20:42Z","pushed_at":"2018-11-30T20:30:28Z","git_url":"git://github.com/jamesmcclain/raster-vision.git","ssh_url":"git@github.com:jamesmcclain/raster-vision.git","clone_url":"https://github.com/jamesmcclain/raster-vision.git","svn_url":"https://github.com/jamesmcclain/raster-vision","homepage":"","size":22042,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"6a35a5424bdbecfb508234dd1f7adf58514a3a69","user":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":80733109,"node_id":"MDEwOlJlcG9zaXRvcnk4MDczMzEwOQ==","name":"raster-vision","full_name":"azavea/raster-vision","private":false,"owner":{"login":"azavea","id":595231,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5NTIzMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/595231?v=4","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/azavea/raster-vision","description":"An open source framework for deep learning on satellite and aerial imagery.","fork":false,"url":"https://api.github.com/repos/azavea/raster-vision","forks_url":"https://api.github.com/repos/azavea/raster-vision/forks","keys_url":"https://api.github.com/repos/azavea/raster-vision/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/raster-vision/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/raster-vision/teams","hooks_url":"https://api.github.com/repos/azavea/raster-vision/hooks","issue_events_url":"https://api.github.com/repos/azavea/raster-vision/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/raster-vision/events","assignees_url":"https://api.github.com/repos/azavea/raster-vision/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/raster-vision/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/raster-vision/tags","blobs_url":"https://api.github.com/repos/azavea/raster-vision/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/raster-vision/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/raster-vision/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/raster-vision/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/raster-vision/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/raster-vision/languages","stargazers_url":"https://api.github.com/repos/azavea/raster-vision/stargazers","contributors_url":"https://api.github.com/repos/azavea/raster-vision/contributors","subscribers_url":"https://api.github.com/repos/azavea/raster-vision/subscribers","subscription_url":"https://api.github.com/repos/azavea/raster-vision/subscription","commits_url":"https://api.github.com/repos/azavea/raster-vision/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/raster-vision/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/raster-vision/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/raster-vision/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/raster-vision/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/raster-vision/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/raster-vision/merges","archive_url":"https://api.github.com/repos/azavea/raster-vision/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/raster-vision/downloads","issues_url":"https://api.github.com/repos/azavea/raster-vision/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/raster-vision/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/raster-vision/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/raster-vision/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/raster-vision/labels{/name}","releases_url":"https://api.github.com/repos/azavea/raster-vision/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/raster-vision/deployments","created_at":"2017-02-02T14:31:54Z","updated_at":"2018-11-30T20:04:17Z","pushed_at":"2018-11-30T20:35:51Z","git_url":"git://github.com/azavea/raster-vision.git","ssh_url":"git@github.com:azavea/raster-vision.git","clone_url":"https://github.com/azavea/raster-vision.git","svn_url":"https://github.com/azavea/raster-vision","homepage":"https://docs.rastervision.io","size":21858,"stargazers_count":589,"watchers_count":589,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":120,"mirror_url":null,"archived":false,"open_issues_count":67,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":120,"open_issues":67,"watchers":589,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/575"},"html":{"href":"https://github.com/azavea/raster-vision/pull/575"},"issue":{"href":"https://api.github.com/repos/azavea/raster-vision/issues/575"},"comments":{"href":"https://api.github.com/repos/azavea/raster-vision/issues/575/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/575/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/raster-vision/pulls/575/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/raster-vision/statuses/a3afcb8f86deba8a31489a483eb076f0cfb14ec2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lewfish"}}