{"id":26507641,"url":"https://github.com/guaishou74851/pcnet","last_synced_at":"2025-04-10T01:07:59.357Z","repository":{"id":65277482,"uuid":"589202313","full_name":"Guaishou74851/PCNet","owner":"Guaishou74851","description":"(TPAMI 2024) Practical Compact Deep Compressed Sensing [PyTorch]","archived":false,"fork":false,"pushed_at":"2025-03-09T06:51:52.000Z","size":9559,"stargazers_count":86,"open_issues_count":1,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T01:07:46.528Z","etag":null,"topics":["algorithm-unrolling","compressed-sensing","compressive-sampling","compressive-sensing","computational-imaging","computer-vision","deep-learning","deep-neural-networks","deep-unfolding","image-reconstruction","image-restoration","python","pytorch","sampling-matrix","single-pixel-imaging","structural-reparameterization"],"latest_commit_sha":null,"homepage":"","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/Guaishou74851.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}},"created_at":"2023-01-15T12:22:38.000Z","updated_at":"2025-04-09T08:57:38.000Z","dependencies_parsed_at":"2025-03-09T07:33:49.806Z","dependency_job_id":null,"html_url":"https://github.com/Guaishou74851/PCNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FPCNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FPCNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FPCNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FPCNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guaishou74851","download_url":"https://codeload.github.com/Guaishou74851/PCNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137888,"owners_count":21053775,"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":["algorithm-unrolling","compressed-sensing","compressive-sampling","compressive-sensing","computational-imaging","computer-vision","deep-learning","deep-neural-networks","deep-unfolding","image-reconstruction","image-restoration","python","pytorch","sampling-matrix","single-pixel-imaging","structural-reparameterization"],"created_at":"2025-03-20T23:29:28.914Z","updated_at":"2025-04-10T01:07:59.326Z","avatar_url":"https://github.com/Guaishou74851.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (TPAMI 2024) Practical Compact Deep Compressed Sensing [PyTorch]\r\n\r\n[![IEEE-Xplore](https://img.shields.io/badge/IEEE_Xplore-Paper-\u003cCOLOR\u003e.svg)](https://ieeexplore.ieee.org/document/10763443) [![icon](https://img.shields.io/badge/ArXiv-Paper-\u003cCOLOR\u003e.svg)](https://arxiv.org/abs/2411.13081) ![visitors](https://visitor-badge.laobi.icu/badge?page_id=Guaishou74851.PCNet)\r\n\r\n[Bin Chen](https://scholar.google.com/citations?hl=en\u0026user=aZDNm98AAAAJ) and [Jian Zhang](https://jianzhang.tech/)†\r\n\r\n*School of Electronic and Computer Engineering, Peking University, Shenzhen, China.*\r\n\r\n† Corresponding author\r\n\r\nAccepted for publication in [IEEE Transactions on Pattern Analysis and Machine Intelligence](https://ieeexplore.ieee.org/xpl/RecentIssue.jsp?punumber=34) (TPAMI) 2024.\r\n\r\n⭐ If PCNet is helpful to you, please star this repo. Thanks! 🤗\r\n\r\n## 📝 Abstract\r\n\r\nRecent years have witnessed the success of deep networks in compressed sensing (CS), which allows for a significant reduction in sampling cost and has gained growing attention since its inception. In this paper, we propose a new practical and compact network dubbed PCNet for general image CS. Specifically, in PCNet, a novel collaborative sampling operator is designed, which consists of a deep conditional filtering step and a dual-branch fast sampling step. The former learns an implicit representation of a linear transformation matrix into a few convolutions and first performs adaptive local filtering on the input image, while the latter then uses a discrete cosine transform and a scrambled block-diagonal Gaussian matrix to generate under-sampled measurements. Our PCNet is equipped with an enhanced proximal gradient descent algorithm-unrolled network for reconstruction. It offers flexibility, interpretability, and strong recovery performance for arbitrary sampling rates once trained. Additionally, we provide a deployment-oriented extraction scheme for single-pixel CS imaging systems, which allows for the convenient conversion of any linear sampling operator to its matrix form to be loaded onto hardware like digital micro-mirror devices. Extensive experiments on natural image CS, quantized CS, and self-supervised CS demonstrate the superior reconstruction accuracy and generalization ability of PCNet compared to existing state-of-the-art methods, particularly for high-resolution images. Code is available at https://github.com/Guaishou74851/PCNet.\r\n\r\n## 🍭 Overview\r\n\r\n![arch](figs/arch.png)\r\n\r\n## ⚙ Environment\r\n\r\n```shell\r\ntorch==2.2.1\r\nnumpy==1.24.4\r\nopencv-python==4.2.0\r\nscikit-image==0.21.0\r\n```\r\n\r\n## ⚡ Test\r\n\r\nRun the following command:\r\n\r\n```shell\r\npython test.py --testset_name=Set11\r\n```\r\n\r\nThe test sets are in `./data`.\r\n\r\nThe recovered results will be in `./test_out`.\r\n\r\nThe test sets CBSD68, Urban100, and DIV2K are available at https://github.com/Guaishou74851/SCNet/tree/main/data.\r\n\r\nFor easy comparison, test results of various existing image CS methods are available on [Google Drive](https://drive.google.com/drive/folders/1Lif_7N_bCyILFLac5JcOtJ9cWpGBNVCd) and [PKU Disk](https://disk.pku.edu.cn/link/AA1C2D8A08050744449CBFCAB51A846B2D).\r\n\r\n## 🔥 Train\r\n\r\nDownload the dataset of [Waterloo Exploration Database](https://kedema.org/project/exploration/index.html) and put the `pristine_images` directory (containing 4744 `.bmp` image files) into `./data`, then run the following command:\r\n\r\n```\r\npython train.py\r\n```\r\n\r\nThe log and model files will be in `./log` and `./model`, respectively.\r\n\r\n## 😍 Results\r\n\r\n![comp1](figs/comp1.png)\r\n\r\n![comp2](figs/comp2.png)\r\n\r\n## 🎓 Citation\r\n\r\nIf you find the code helpful in your research or work, please cite the following paper:\r\n\r\n```\r\n@article{chen2024practical,\r\n  title={Practical Compact Deep Compressed Sensing},\r\n  author={Chen, Bin and Zhang, Jian},\r\n  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},\r\n  year={2024},\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguaishou74851%2Fpcnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguaishou74851%2Fpcnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguaishou74851%2Fpcnet/lists"}