{"id":26507634,"url":"https://github.com/guaishou74851/casnet","last_synced_at":"2025-03-20T23:29:27.106Z","repository":{"id":185245201,"uuid":"513506283","full_name":"Guaishou74851/CASNet","owner":"Guaishou74851","description":"(TIP 2022) Content-aware Scalable Deep Compressed Sensing [PyTorch]","archived":false,"fork":false,"pushed_at":"2025-03-09T07:03:09.000Z","size":15207,"stargazers_count":35,"open_issues_count":0,"forks_count":8,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-09T08:18:06.604Z","etag":null,"topics":["compressed-sensing","computer-vision","deep-learning","deep-unfolding","image-processing","image-restoration","optimization","scalability"],"latest_commit_sha":null,"homepage":"https://ieeexplore.ieee.org/document/9854112/","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":"2022-07-13T12:08:10.000Z","updated_at":"2025-03-09T07:03:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"3531a1e8-54a4-4607-94ea-45acd0534120","html_url":"https://github.com/Guaishou74851/CASNet","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"445a26b9659fc15c38ebdf72951287c10b429de0"},"previous_names":["guaishou74851/casnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FCASNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FCASNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FCASNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Guaishou74851%2FCASNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Guaishou74851","download_url":"https://codeload.github.com/Guaishou74851/CASNet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244709580,"owners_count":20497097,"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":["compressed-sensing","computer-vision","deep-learning","deep-unfolding","image-processing","image-restoration","optimization","scalability"],"created_at":"2025-03-20T23:29:26.662Z","updated_at":"2025-03-20T23:29:27.096Z","avatar_url":"https://github.com/Guaishou74851.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# (TIP 2022) Content-Aware Scalable 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/9854112/) [![ArXiv](https://img.shields.io/badge/ArXiv-Paper-\u003cCOLOR\u003e.svg)](https://arxiv.org/abs/2207.09313) ![visitors](https://visitor-badge.laobi.icu/badge?page_id=Guaishou74851.CASNet)\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 as a Regular paper in the IEEE Transactions on Image Processing (T-IP).\r\n\r\n⭐ If CASNet is helpful to you, please star this repo. Thanks! 🤗\r\n\r\n## 📝 Abstract\r\n\r\nTo more efficiently address image compressed sensing (CS) problems, we present a novel content-aware scalable network dubbed CASNet which collectively achieves adaptive sampling rate allocation, fine granular scalability and high-quality reconstruction. We first adopt a data-driven saliency detector to evaluate the importances of different image regions and propose a saliency-based block ratio aggregation (BRA) strategy for sampling rate allocation. A unified learnable generating matrix is then developed to produce sampling matrix of any CS ratio with an ordered structure. Being equipped with the optimization-inspired recovery subnet guided by saliency information and a multi-block training scheme preventing blocking artifacts, CASNet jointly reconstructs the image blocks sampled at various sampling rates with one single model. To accelerate training convergence and improve network robustness, we propose an SVD-based initialization scheme and a random transformation enhancement (RTE) strategy, which are extensible without introducing extra parameters. All the CASNet components can be combined and learned end-to-end. We further provide a four-stage implementation for evaluation and practical deployments. Experiments demonstrate that CASNet outperforms other CS networks by a large margin, validating the collaboration and mutual supports among its components and strategies. Codes are available at [https://github.com/Guaishou74851/CASNet](https://github.com/Guaishou74851/CASNet).\r\n\r\n## 🍭 Overview\r\n\r\nOur poster ([high-resolution PDF version](https://drive.google.com/file/d/1unkNsNGFNyknubnKFYbiXZSmLUw_Iu9D/view?usp=sharing)) in the conference of [VALSE 2022](http://valser.org/2022/#/poster):\r\n\r\n![poster](figs/poster.png)\r\n\r\n## ⚙ Environment\r\n\r\n```shell\r\nconda env create -f environment.yml\r\n```\r\n\r\n## ⚡ Test\r\n\r\nDownload the model checkpoint file [net_params_320.pkl](https://drive.google.com/file/d/193UF6DoRuWYTuX_PZiR6RTIqBxyuE5e9/view?usp=sharing) and put it into `./model/layer_13_block_32`, then run:\r\n\r\n```shell\r\npython test.py --testset_name=Set11\r\npython test.py --testset_name=BSD68\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 preprocessed data file [Training_Data_size128_CS_T91andTrain400.mat](https://drive.google.com/file/d/18ULdi97YLqZXewoqOvdX2ci4nGCZDoku/view?usp=sharing) and put it into `./data`, then run:\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![result](figs/res.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{chen2022content,\r\n  title={Content-Aware Scalable Deep Compressed Sensing},\r\n  author={Chen, Bin and Zhang, Jian},\r\n  journal={IEEE Transactions on Image Processing},\r\n  volume={31},\r\n  pages={5412--5426},\r\n  year={2022},\r\n  publisher={IEEE}\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguaishou74851%2Fcasnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguaishou74851%2Fcasnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguaishou74851%2Fcasnet/lists"}