{"id":47336645,"url":"https://github.com/structuralneurobiologylab/deepfocus","last_synced_at":"2026-03-17T22:00:30.807Z","repository":{"id":204885155,"uuid":"702230275","full_name":"StructuralNeurobiologyLab/DeepFocus","owner":"StructuralNeurobiologyLab","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-17T10:11:08.000Z","size":8692,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-17T11:24:38.747Z","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/StructuralNeurobiologyLab.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}},"created_at":"2023-10-08T21:38:06.000Z","updated_at":"2025-02-17T10:11:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c775ecdb-a0e7-4db5-882c-e8de333f0871","html_url":"https://github.com/StructuralNeurobiologyLab/DeepFocus","commit_stats":null,"previous_names":["structuralneurobiologylab/deepfocus"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/StructuralNeurobiologyLab/DeepFocus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StructuralNeurobiologyLab%2FDeepFocus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StructuralNeurobiologyLab%2FDeepFocus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StructuralNeurobiologyLab%2FDeepFocus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StructuralNeurobiologyLab%2FDeepFocus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StructuralNeurobiologyLab","download_url":"https://codeload.github.com/StructuralNeurobiologyLab/DeepFocus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StructuralNeurobiologyLab%2FDeepFocus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"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":"2026-03-17T22:00:09.795Z","updated_at":"2026-03-17T22:00:30.800Z","avatar_url":"https://github.com/StructuralNeurobiologyLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DeepFocus\nDeep learning based focus and stigmation correction for electron microscopes (https://doi.org/10.1038/s41467-024-45042-3).\n\n## Installation\nTo install the `deepfocus` package, run the following (requires `conda`):\n```\ngit clone https://github.com/StructuralNeurobiologyLab/DeepFocus\ncd DeepFocus\nconda env create -f environment.yml -n deepfocus\nconda activate deepfocus\npip install -e .\n```\n\n## Inference example\nAfter installing the dependencies and the package you can run `utils/infer.py` to apply the pretrained model to the\nexample data:\n```\npython scripts/infer_examples.py\n```\nwhich results in:\n```\nPredicted `working distance` correction 13.03 +- 0.37 (mean +- s.d.) for a known aberration of -13.324 um.\nPredicted `stigmator x` correction 0.32 +- 0.09 (mean +- s.d.) for a known aberration of 0.466 (a.u.).\nPredicted `stigmator y` correction -0.15 +- 0.04 (mean +- s.d.) for a known aberration of 0.219 (a.u.).\n```\nThe pretrained model is the baseline model used in the publication with two 512x512 input patches (symmetric perturbation of\n5 µm). The example data is part of the training/validation data.\n\n## Training example\nFor trainings, we provide example scripts for the baseline model and the EfficientNet (`{_efficientnet}.py` suffix).\nTo start a training run the following command:\n```\npython scripts/train_deepfocus.py\n```\nThe default root directory for the training data is `data_root='~/DeepFocus/GT/'` and for the training results\n`save_root='~/DeepFocus/trainings/'`. Adjust the paths in the script(s) accordingly.\n\n## Team\nThe DeepFocus project was developed at the Max Planck Institute for Biological Intelligence in Martinsried by Philipp\nSchubert under the supervision of Joergen Kornfeld. We would like to thank Rangoli Saxena for supporting us with MAPFoSt.\n\n## How to cite DeepFocus\n\n```\n@article{Schubert2024,\n  title = {DeepFocus: fast focus and astigmatism correction for electron microscopy},\n  volume = {15},\n  ISSN = {2041-1723},\n  url = {http://dx.doi.org/10.1038/s41467-024-45042-3},\n  DOI = {10.1038/s41467-024-45042-3},\n  number = {1},\n  journal = {Nature Communications},\n  publisher = {Springer Science and Business Media LLC},\n  author = {Schubert,  P. J. and Saxena,  R. and Kornfeld,  J.},\n  year = {2024},\n  month = jan \n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructuralneurobiologylab%2Fdeepfocus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstructuralneurobiologylab%2Fdeepfocus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstructuralneurobiologylab%2Fdeepfocus/lists"}