{"id":26356564,"url":"https://github.com/ds4sd/patcid","last_synced_at":"2025-03-16T13:32:06.602Z","repository":{"id":240235538,"uuid":"801994555","full_name":"DS4SD/PatCID","owner":"DS4SD","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-26T09:43:20.000Z","size":76898,"stargazers_count":45,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-26T10:33:40.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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}},"created_at":"2024-05-17T10:05:53.000Z","updated_at":"2025-02-26T09:43:23.000Z","dependencies_parsed_at":"2024-11-26T11:35:23.189Z","dependency_job_id":null,"html_url":"https://github.com/DS4SD/PatCID","commit_stats":null,"previous_names":["ds4sd/patcid"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FPatCID","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FPatCID/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FPatCID/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DS4SD%2FPatCID/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DS4SD","download_url":"https://codeload.github.com/DS4SD/PatCID/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243875058,"owners_count":20361937,"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":[],"created_at":"2025-03-16T13:31:09.239Z","updated_at":"2025-03-16T13:32:06.592Z","avatar_url":"https://github.com/DS4SD.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PatCID\n\nThis is the repository for [PatCID: an open-access dataset of chemical structures in patent documents](https://www.nature.com/articles/s41467-024-50779-y).\n\n![MolGrapher](assets/introduction.png)\n\n### Installation\n\nCreate a virtual environment.\n\n```\nconda create -n patcid python=3.11\nconda activate patcid\n```\nInstall poppler.\n```\nLinux: apt-get install poppler-utils \nMac: brew install poppler \n```\n\nInstall python dependencies.\n```\npip install -e .\n```\n\n### Download PatCID Dataset \n\nThe [PatCID dataset is available on Zenodo](https://doi.org/10.5281/zenodo.10572870). \n```\nwget https://zenodo.org/records/10572870/files/patcid.zip?download=1 -O patcid.zip\nunzip patcid.zip -d ./data/patcid/\n```\n(Download size: `5.7 GB`, files format: `.jsonl`)\n\n### Document Retrieval\n\nRun the notebook `./examples/molecule_query.ipynb` to use PatCID to retrieve documents referencing a molecule of interest. \n\n### Molecule Retrieval\n\nRun the notebook `./examples/patent_query.ipynb` to use PatCID to retrieve molecules displayed in a given patent document. \n\n### User Interface \n\nhttps://github.com/DS4SD/PatCID/assets/73230090/0fc7c2bd-ce1b-4ded-a278-7d9c4c277244\n\nTo request access to the above user interface, please contact the IBM's [Deep Search](https://ds4sd.github.io/) team at deepsearch-core@zurich.ibm.com.\n\n### Benchmark Datasets\n\nThe benchmarks datasets [D2C-UNI and D2C-RND are available on Zenodo](https://doi.org/10.5281/zenodo.10978812).\n\n### Code \n\nThe code repositories used to build and evaluate PatCID are available:\n- The [classification model](https://github.com/DS4SD/MolClassifier)\n- The [recognition model](https://github.com/DS4SD/MolGrapher)\n- The [chemical-structure annotation tool](https://github.com/DS4SD/MolAnnotator).\n\nFor segmenting chemical-structure images from documents, we use [DECIMER Segmentation](https://github.com/Kohulan/DECIMER-Image-Segmentation) from K. Rajan, H. O. Brinkhaus, M. Sorokina, A. Zielesny and C. Steinbeck.\n\n### Models\n\nThe model weights are available on Hugging Face:\n- The [classification model](https://huggingface.co/ds4sd/MolClassifier)\n- The [recognition model](https://huggingface.co/ds4sd/MolGrapher).\n\n### Training Datasets\n\nThe training datasets are available on Zenodo and Hugging Face:\n- The [image classification model dataset](https://doi.org/10.5281/zenodo.10978564)\n- The [molecule recognition model dataset](https://huggingface.co/datasets/ds4sd/MolGrapher-Synthetic-300K).\n\n### Additional Visualization\n\nTo test our processing pipeline outside its main application domain, we process a [scientific publication](https://chemrxiv.org/engage/chemrxiv/article-details/662d287a91aefa6ce198f9b8) published on ChemRxiv. `./data/extra/scientific_paper_example/` contains the pages of the document (`page_*.png`) annotated with the segmentation and classification predictions. For pages containing molecules, the predicted molecules are provided in `page_*_molecules.txt`.\n\n### Citation\n\nIf you find this repository useful, please consider citing:\n\n```\n@Article{Morin2024,\n    author={Morin, Lucas\n    and Weber, Val{\\'e}ry\n    and Meijer, Gerhard Ingmar\n    and Yu, Fisher\n    and Staar, Peter W. J.},\n    title={PatCID: an open-access dataset of chemical structures in patent documents},\n    journal={Nature Communications},\n    year={2024},\n    month={Aug},\n    day={02},\n    volume={15},\n    number={1},\n    pages={6532},\n    issn={2041-1723},\n    doi={10.1038/s41467-024-50779-y},\n    url={https://doi.org/10.1038/s41467-024-50779-y}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fpatcid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds4sd%2Fpatcid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds4sd%2Fpatcid/lists"}