{"id":19412722,"url":"https://github.com/tensorlayer/fmri-deep-image-reconstruction","last_synced_at":"2026-06-12T04:31:40.444Z","repository":{"id":72877642,"uuid":"148144355","full_name":"tensorlayer/fMRI-deep-image-reconstruction","owner":"tensorlayer","description":"fMRI deep image reconstruction ","archived":false,"fork":false,"pushed_at":"2018-09-21T15:32:13.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-02-25T02:43:54.523Z","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/tensorlayer.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":"2018-09-10T11:22:30.000Z","updated_at":"2020-12-13T17:11:26.000Z","dependencies_parsed_at":"2023-09-18T10:48:49.646Z","dependency_job_id":null,"html_url":"https://github.com/tensorlayer/fMRI-deep-image-reconstruction","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tensorlayer/fMRI-deep-image-reconstruction","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorlayer%2FfMRI-deep-image-reconstruction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorlayer%2FfMRI-deep-image-reconstruction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorlayer%2FfMRI-deep-image-reconstruction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorlayer%2FfMRI-deep-image-reconstruction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tensorlayer","download_url":"https://codeload.github.com/tensorlayer/fMRI-deep-image-reconstruction/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tensorlayer%2FfMRI-deep-image-reconstruction/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34229624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"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-10T12:27:57.539Z","updated_at":"2026-06-12T04:31:40.422Z","avatar_url":"https://github.com/tensorlayer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fMRI-deep-image-reconstruction\r\n## Image Generation (Alpha-GAN)\r\nThis is a Tensorflow / Tensorlayer implementation of α-GAN for generating images to be used in EEG \u0026 fMRI deep image reconstruction.\r\n\r\nα-GAN: [Variational Approaches for Auto-Encoding Generative Adversarial Networks](https://arxiv.org/abs/1706.04987)\r\n\r\nTensorflow - v1.8.0\r\n\r\nTensorlayer - v1.9.0\r\n\r\n### Usage\r\n#### Training\r\nThe training dataset must first be converted into a `.tfrecord` format.  \r\n\r\nThis can be done by going to `utils.py` and modifying `class_text_to_int(label)` to contain the list of classes, and running `convert_tfrecord(data_dir, save_dir, filename)`.  An example is provided at the bottom of `utils.py` which you can run by executing `utils.py`.\r\n\r\n*(`data_dir` should contain all the folders with the dataset labels, and all the dataset images should be in their respective folder)*\r\n\r\nBefore training the α-GAN, make sure the directory paths in `config.py` correspond to the dataset locations.\r\n\r\nExecute the training by running the following command\r\n```\r\npython3 main.py\r\n```\r\nThis will train the α-GAN and save the model in `checkpoints_dir` every epoch.\r\n\r\nGenerator testing is split into two parts: training set, and generation performance.  These two are saved in `save_gan_dir` and `save_test_gan_dir` respectively.\r\n\r\n#### Encoding\r\nThis extracts the features from the given folder of images using the trained encoder, and stores them in `encoded_feat.pkl`.\r\n\r\n```\r\npython3 main.py --mode=encode\r\n```\r\n\r\n#### Generating\r\nThis reconstructs the folder of images from the encoding section by using the extracted features from `encoded_feat.pkl` to generate images.\r\n\r\n```\r\npython3 main.py --mode=gen\r\npython3 main.py --mode=generate\r\n```\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorlayer%2Ffmri-deep-image-reconstruction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftensorlayer%2Ffmri-deep-image-reconstruction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftensorlayer%2Ffmri-deep-image-reconstruction/lists"}