{"id":22069246,"url":"https://github.com/Kent0n-Li/SAMScore","last_synced_at":"2025-07-24T07:32:44.385Z","repository":{"id":169191577,"uuid":"644522584","full_name":"Kent0n-Li/SAMScore","owner":"Kent0n-Li","description":null,"archived":false,"fork":false,"pushed_at":"2024-02-23T20:31:50.000Z","size":3102,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T13:21:37.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kent0n-Li.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":"2023-05-23T17:38:07.000Z","updated_at":"2024-04-17T13:41:47.000Z","dependencies_parsed_at":"2024-11-06T04:27:15.116Z","dependency_job_id":null,"html_url":"https://github.com/Kent0n-Li/SAMScore","commit_stats":null,"previous_names":["kent0n-li/samscore"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kent0n-Li%2FSAMScore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kent0n-Li%2FSAMScore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kent0n-Li%2FSAMScore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kent0n-Li%2FSAMScore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kent0n-Li","download_url":"https://codeload.github.com/Kent0n-Li/SAMScore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227421452,"owners_count":17775011,"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":"2024-11-30T20:04:48.043Z","updated_at":"2025-07-24T07:32:44.375Z","avatar_url":"https://github.com/Kent0n-Li.png","language":"Jupyter Notebook","funding_links":[],"categories":["Paper List"],"sub_categories":["Follow-up Papers"],"readme":"\n## [SAMScore: A Content Structural Similarity Metric for Image Translation Evaluation (IEEE TAI)](https://ieeexplore.ieee.org/abstract/document/10857645)\n\n[Yunxiang Li](https://www.yunxiangli.top/), Meixu Chen, Kai Wang, [Jun Ma](https://scholar.google.com/citations?hl=zh-CN\u0026user=bW1UV4IAAAAJ), [Alan C. Bovik](https://www.ece.utexas.edu/people/faculty/alan-bovik), [You Zhang](https://profiles.utsouthwestern.edu/profile/161901/you-zhang.html). \n\n\u003cdiv\u003e\n    \u003ca href=\"https://arxiv.org/pdf/2305.15367.pdf\"\u003e\u003cimg src=\"https://info.arxiv.org/brand/images/brand-logo-primary.jpg\" alt=\"Arxiv\" width=85\u003e\u003c/a\u003e \n      \u003cbr\u003e\n    \u003ca href=\"https://colab.research.google.com/github/Kent0n-Li/SAMScore/blob/main/SAMScore.ipynb#scrollTo=mCidlfXu88UY\"\u003e\u003cimg src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"\u003e\u003c/a\u003e\n  \u003c/div\u003e\n\n  \n  \n\u003cimg src='imgs/overview.jpg' width=1200\u003e\n\n### Quick start\n\nRun `pip install samscore`.\n```python\npip install git+https://github.com/ChaoningZhang/MobileSAM.git\npip install timm\n\npip install samscore\npip install git+https://github.com/facebookresearch/segment-anything.git\n```\n\nThe following Python code is all you need.\n```python\nimport requests\nimport os\nimport samscore\n\ndef download_image(url, save_path):\n    response = requests.get(url)\n    response.raise_for_status()  # Raise an exception if the request was unsuccessful\n\n    with open(save_path, 'wb') as file:\n        file.write(response.content)\nos.makedirs('imgs', exist_ok=True)\n# Example usage\nimage_url = 'https://i.ibb.co/yFFg5pn/n02381460-20-real.png'\nsave_location = 'imgs/real.png'\ndownload_image(image_url, save_location)\n\nimage_url = 'https://i.ibb.co/GCQ2jQy/n02381460-20-fake.png'\nsave_location = 'imgs/fake.png'\ndownload_image(image_url, save_location)\n\n## Initializing the model\n# You can choose \"vit_t\", \"vit_l\", \"vit_b\", \"vit_h\"\nSAMScore_Evaluation = samscore.SAMScore(model_type = \"vit_b\" )\nsamscore_result = SAMScore_Evaluation.evaluation_from_path(source_image_path='imgs/real.png',  generated_image_path='imgs/fake.png')\n\nprint('SAMScore: %.4f'%samscore_result)\n```\n\n\n\n## Citation\n\nIf you find this repository useful for your research, please use the following.\n\n```\n@article{li2025samscore,\n  title={SAMScore: A Content Structural Similarity Metric for Image Translation Evaluation},\n  author={Li, Yunxiang and Chen, Meixu and Wang, Kai and Ma, Jun and Bovik, Alan C and Zhang, You},\n  journal={IEEE Transactions on Artificial Intelligence},\n  year={2025},\n  publisher={IEEE}\n}\n```\n\n\n\u003cimg src='imgs/Affine.png' width=1200\u003e\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKent0n-Li%2FSAMScore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKent0n-Li%2FSAMScore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKent0n-Li%2FSAMScore/lists"}