{"id":31791027,"url":"https://github.com/ds4sd/subgrapher","last_synced_at":"2026-02-25T23:06:21.257Z","repository":{"id":318379174,"uuid":"961992026","full_name":"DS4SD/SubGrapher","owner":"DS4SD","description":"[J. Cheminform.] SubGrapher: Visual Fingerprinting of Chemical Structures","archived":false,"fork":false,"pushed_at":"2025-10-14T09:14:47.000Z","size":597,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-14T18:22:24.611Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2504.19695","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/DS4SD.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-07T13:38:26.000Z","updated_at":"2025-10-14T09:16:25.000Z","dependencies_parsed_at":"2025-10-06T21:29:13.465Z","dependency_job_id":null,"html_url":"https://github.com/DS4SD/SubGrapher","commit_stats":null,"previous_names":["ds4sd/subgrapher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DS4SD/SubGrapher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FSubGrapher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FSubGrapher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FSubGrapher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FSubGrapher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DS4SD","download_url":"https://codeload.github.com/DS4SD/SubGrapher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FSubGrapher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29844845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"ssl_error","status_checked_at":"2026-02-25T22:37:25.960Z","response_time":61,"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":"2025-10-10T16:50:24.150Z","updated_at":"2026-02-25T23:06:21.252Z","avatar_url":"https://github.com/DS4SD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SubGrapher-IBM\n\n[![Huggingface](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-SubGrapher--Datasets-blue)](https://huggingface.co/datasets/ds4sd/SubGrapher-Datasets)\n[![arXiv](https://img.shields.io/badge/arXiv-2504.19695-919191.svg)](https://doi.org/10.48550/arXiv.2504.19695)\n[![paper](https://img.shields.io/badge/Paper-10.1186%2Fs13321--025--01091--4-b31b1b.svg)](https://jcheminf.biomedcentral.com/articles/10.1186/s13321-025-01091-4)\n\nThis is the repository for [SubGrapher: Visual Fingerprinting of Chemical Structures](https://jcheminf.biomedcentral.com/articles/10.1186/s13321-025-01091-4). SubGrapher is a model to detect functional groups in molecule images and convert them into visual fingerprints.\n\n\u003cimg src=\"assets/architecture.png\" width=\"600\" /\u003e\n\n### Citation\n\nIf you find this repository useful, please consider citing:\n```\n@article{Morin2025,\n\ttitle        = {{Subgrapher: visual fingerprinting of chemical structures}},\n\tauthor       = {Morin, Lucas and Meijer, Gerhard Ingmar and Weber, Val{\\'e}ry and Van Gool, Luc and Staar, Peter W. J.},\n\tyear         = 2025,\n\tmonth        = {Sep},\n\tday          = 29,\n\tjournal      = {Journal of Cheminformatics},\n\tvolume       = 17,\n\tnumber       = 1,\n\tpages        = 149,\n\tdoi          = {10.1186/s13321-025-01091-4},\n\tissn         = {1758-2946},\n    url          = {https://doi.org/10.1186/s13321-025-01091-4}\n}\n```\n\n### Installation\n\nCreate a virtual environment.\n\n```\npython3.11 -m venv subgrapher-env\nsource subgrapher-env/bin/activate\n```\n\nInstall SubGrapher.\n```\npip install -e .\n```\n\n### Inference\n\n#### Script\n\n1. Place your input images in: `SubGrapher/data/images/default/`.\n\n2. Run SubGrapher:\n```\npython3 subgrapher/scripts/run.py\n```\n\n3. Read predictions in: `SubGrapher/data/predictions/default/`. \nPredictions are structured as follows:\n```\n{\n    \"substructure\": \"Amine_(tertiary)\",       # Predicted substructure                               \n    \"confidence\": 1.0,                        # Model confidence\n    \"bbox\": [525.3, 273.7, 675.8, 403.7],     # Predicted bounding box\n    \"type\": \"functional-groups\"               # Substructure type (functional-groups or carbon-chains)\n}\n...\n```\n\n4. (Optional) Read visualizations in: `SubGrapher/data/visualization/default/`.\nVisualizations are structured as follows:\n```\nSubGrapher/data/visualization/default/\n├── US07320977-20080122-C00078_fingerprint.png          # Visualization of the SVMF \n├── US07320977-20080122-C00078_substructures.png        # Visualization of predicted substructures\n├── US07320977-20080122-C00078_substructures.txt        # Labels of predicted substructures\n...\n```\n\n### Model\n\nThe model weights are available on [Hugging Face](https://huggingface.co/ds4sd/SubGrapher). They are automatically downloaded when running the model's inference. \n\n### Evaluation Dataset\n\nThe benchmarks used for the visual fingerprinting evaluation are available on [HuggingFace](https://huggingface.co/datasets/ds4sd/SubGrapher-Datasets/) (download size: 50 MB).\n```\nwget https://huggingface.co/datasets/ds4sd/SubGrapher-Datasets/resolve/main/benchmarks.zip\n```\n\nThe benchmarks are structured as follows:\n```\nbenchmarks/\n├── adenosine/                          # Benchmark (Adenosine, Camphor, Cholesterol, Limonene, or Pyridine.)\n│   ├── 90.csv/                         # SMILES \n│   └── adenosine/                      \n│        ├── images_2/                  # Images \n│        └── molfiles/                  # MolFiles \n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fsubgrapher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds4sd%2Fsubgrapher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fsubgrapher/lists"}