{"id":21483448,"url":"https://github.com/cybershadow/image-quality","last_synced_at":"2025-10-10T22:46:18.272Z","repository":{"id":136736989,"uuid":"351259986","full_name":"CyberShadow/image-quality","owner":"CyberShadow","description":"Quantifying generation loss using machine learning","archived":false,"fork":false,"pushed_at":"2021-03-25T00:17:51.000Z","size":596,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T22:46:17.174Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blog.cy.md/2021/03/24/solving-xkcd-1683/","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/CyberShadow.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-25T00:17:48.000Z","updated_at":"2021-03-31T09:28:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"66e46de4-469b-4940-bee2-1abed4bdb910","html_url":"https://github.com/CyberShadow/image-quality","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CyberShadow/image-quality","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberShadow%2Fimage-quality","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberShadow%2Fimage-quality/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberShadow%2Fimage-quality/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberShadow%2Fimage-quality/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CyberShadow","download_url":"https://codeload.github.com/CyberShadow/image-quality/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CyberShadow%2Fimage-quality/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005462,"owners_count":26083902,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-23T12:47:31.976Z","updated_at":"2025-10-10T22:46:18.264Z","avatar_url":"https://github.com/CyberShadow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Image Quality Experiment\n========================\n\nSee [the blog post](https://blog.cy.md/2021/03/24/solving-xkcd-1683/) for a description.\n\nRunning the model\n=================\n\nPrerequisites:\n\n- A [D compiler](https://dlang.org/download.html)\n- ImageMagick\n- Tensorflow 2.x (or Docker)\n\nSetup:\n\n- Make sure this repository is cloned recursively.\n  Run `git submodule update --init --recursive` otherwise.\n\n- Edit `docker-run.sh` according to the environment in which you run Python/TensorFlow/etc.\n  If you have it installed natively on your host, replace its contents with `exec \"$@\"`.\n  Running `./quality.sh check` should print `Python is OK`.\n\nScoring images:\n\n- Run e.g.: `rdmd filescore.d xkcd/*.png`\n\nTraining the model\n==================\n\n1. Create a directory (or symbolic link pointing to one) called `images`, and populate it with at least 10000 images to use to generate the training data.\n\n2. Create a directory (or symbolic link pointing to one) called `tests`, which will contain preprocessed images, edited versions, and metadata.\n\n3. Run `rdmd gentests` to preprocess the test images and create edited versions.\n\n4. Run `mkdata.sh` to generate the training data from the test images.\n\n5. Run `./quality.sh fit` to fit the sample evaluator model.\n\n6. Once satisfied, stop and rename the best model over `quality.h5`.\n\n7. Run `./quality.sh fit_summarizer` to fit the summarizer model.\n\n8. Once satisfied, stop and rename the best model over `summarizer.h5`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybershadow%2Fimage-quality","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcybershadow%2Fimage-quality","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcybershadow%2Fimage-quality/lists"}