{"id":20562779,"url":"https://github.com/mint-lab/roi_picker","last_synced_at":"2026-02-06T17:03:10.780Z","repository":{"id":203492566,"uuid":"687861092","full_name":"mint-lab/roi_picker","owner":"mint-lab","description":"A simple tool to visualize/edit region-of-interests (ROIs) on images","archived":false,"fork":false,"pushed_at":"2024-10-09T23:12:33.000Z","size":24072,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T03:35:36.101Z","etag":null,"topics":["region-of-interest","roi","roi-selection"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mint-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-06T06:52:47.000Z","updated_at":"2025-01-11T14:55:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"32a053ee-789b-4f08-9e1f-7f45f6cc9a94","html_url":"https://github.com/mint-lab/roi_picker","commit_stats":null,"previous_names":["mint-lab/roi_picker"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mint-lab/roi_picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mint-lab%2Froi_picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mint-lab%2Froi_picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mint-lab%2Froi_picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mint-lab%2Froi_picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mint-lab","download_url":"https://codeload.github.com/mint-lab/roi_picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mint-lab%2Froi_picker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29169384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T16:33:35.550Z","status":"ssl_error","status_checked_at":"2026-02-06T16:33:30.716Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["region-of-interest","roi","roi-selection"],"created_at":"2024-11-16T04:13:31.001Z","updated_at":"2026-02-06T17:03:10.745Z","avatar_url":"https://github.com/mint-lab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## ROI Picker\n_ROI Picker_ is a simple tool to visualize [region-of-interest](https://en.wikipedia.org/wiki/Region_of_interest)s (ROIs) and edit them. It is common for many computer vision tasks to define or select ROIs on an image. _ROI picker_ can provide simple GUI to add, modify, and remove ROIs without complex packages or libraries. _ROI Picker_ is written with [Python](https://www.python.org/) and [OpenCV](https://opencv.org/), and it works with a single Python file, `roi_picker.py`.\n\n_ROI Picker_ now supports the following ROI shapes. Of course, users can extend more through class inheritance or modification.\n\n* A set of points\n* A set of line segments\n* A polygon\n\nThe above shapes are all represented as `[(x1, y1), (x2, y2), ..., (xn, yn)]`.\n\n\n\n### How to Run ROI Picker\n* **Prerequisite**\n  * If you don't install OpenCV, please install OpenCV: `pip install opencv-python`.\n* **Command-line usage**\n  * `python roi_picker.py image_file [-r roi_file.json] [-c config_file.json]`\n    * `-r` (or `--roi_file`): Specify a ROI file which contains ROI data (default: `image_file.json`)\n    * `-c` (or `--config_file`): Specify a configuration file which can change visualization and GUI interface (default: `roi_picker.json`)\n    * :memo: Note) If a default file does not exist, _ROI Picker_ just starts with empty ROI or with its initial configuration.\n* **Demo examples**\n  * `python roi_picker.py demo/miraehall_satellite.png`\n    * Start _ROI Picker_ with the default ROI file (`demo/miraehall_satellite.json`) and default configuration file (`roi_picker.json`)\n  * `python roi_picker.py demo/miraehall_220722.png -r demo/miraehall_camera.json`\n    * Start _ROI Picker_ with the specific ROI file (`demo/miraehall_image.json`)\n  * `python roi_picker.py demo/miraehall_satellite.png -c demo/bold_style.json`\n    * Start _ROI Picker_ with its default ROI file with specific configuration file (`demo/bold_style.json`)\n    * :memo: Note) You can customize visualization and keyboard shortcuts by changing a configuration file. Please refer `ROIPicker::get_default_config()` in `roi_picker.py` file.\n* **[Extension examples](https://github.com/mint-lab/roi_picker/blob/master/HOW_TO_EXTEND.md)**\n\n\n\n### GUI Interface\n:memo: Note) _ROI Picker_ provides minimal GUI without any menu or button for simplicity. Its GUI inputs are totally based on mouse and keyboard.\n\n* **Mouse actions**\n  * _Click_: Select a ROI\n    * If you _click_ at an existing point, the ROI which contains the point is selected.\n  * _Double Click_: Add or delete a point\n    * If you _double click_ at an existing point, the point will be removed.\n    * If you _double click_ on an existing line (for line segment or polygon), a new point will be inserted on the line.\n    * If you _double click_ on an image, a new point will be added.\n  * `Ctrl`+_Drag_: Move the clicked point\n\n* **Keyboard shortcuts**\n  * `ESC`: Terminate _ROI Picker_\n  * `Tab`: Select the next ROI\n  * `Ctrl`+`P`: Add a new set of **p**oints\n  * `Ctrl`+`L`: Add a new set of **l**ine segment\n  * `Ctrl`+`G`: Add a new poly**g**on\n  * `Ctrl`+`R`: **R**enew _ROI Picker_ (Clear all ROIs)\n  * `Ctrl`+`D`: **D**elete the selected ROI\n  * `Ctrl`+`M`: I**m**port ROI data from the ROI file\n  * `Ctrl`+`E`: **E**xport ROI data to the ROI file\n  * `Ctrl`+`F`: Export con**f**iguration to a JSON file\n  * `Ctrl`+`Z`: Show and hide the image **z**oom\n  * `Ctrl`+`T`: Show and hide the s**t**atus of the selected ROI\n  * `+`: Zoom up the image\n  * `-`: Zoom down the image\n\n\n\n### Screenshots\nYou can see the following demo if you run the above three _usage examples_, respectively.\n\n  \u003cimg width=\"452px\" src=\"https://github.com/mint-lab/roi_picker/blob/master/demo/miraehall_satellite_demo.png\" /\u003e\n\n  \u003cimg width=\"897px\" src=\"https://github.com/mint-lab/roi_picker/blob/master/demo/miraehall_220722_demo.png\" /\u003e\n\n:memo: Note) Please remember that you can customize visualization and keyboard shortcuts when you apply your own configuration file (e.g. `demo/bold_style.json`). The following example is same data only with a different configuration file.\n\n  \u003cimg width=\"542px\" src=\"https://github.com/mint-lab/roi_picker/blob/master/demo/miraehall_satellite_demo_bold.png\" /\u003e\n\n\n\n### Authors\n* [Nguyen Cong Quy](https://github.com/ncquy)\n* [Sunglok Choi](https://mint-lab.github.io/sunglok/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmint-lab%2Froi_picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmint-lab%2Froi_picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmint-lab%2Froi_picker/lists"}