{"id":37350027,"url":"https://github.com/tum-bgd/compression-in-dl","last_synced_at":"2026-01-16T04:01:21.531Z","repository":{"id":140980107,"uuid":"572920656","full_name":"tum-bgd/compression-in-dl","owner":"tum-bgd","description":"Compression Supports Spatial Deep Learning","archived":false,"fork":false,"pushed_at":"2022-12-01T16:49:21.000Z","size":1347,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"Publication-at-IEEE-JSTARS","last_synced_at":"2024-05-20T17:26:34.407Z","etag":null,"topics":["compression","deep-learning","image-classification","keras","python","remote-sensing","spatial-data","tensorflow","vitis-ai"],"latest_commit_sha":null,"homepage":"https://www.bgd.ed.tum.de/","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/tum-bgd.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}},"created_at":"2022-12-01T10:11:42.000Z","updated_at":"2022-12-07T07:16:07.000Z","dependencies_parsed_at":"2023-09-24T09:07:24.340Z","dependency_job_id":null,"html_url":"https://github.com/tum-bgd/compression-in-dl","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"68ba78c80afea0e1361f686b70a844c232a47d4a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tum-bgd/compression-in-dl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-bgd%2Fcompression-in-dl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-bgd%2Fcompression-in-dl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-bgd%2Fcompression-in-dl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-bgd%2Fcompression-in-dl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tum-bgd","download_url":"https://codeload.github.com/tum-bgd/compression-in-dl/tar.gz/refs/heads/Publication-at-IEEE-JSTARS","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tum-bgd%2Fcompression-in-dl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28477206,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T03:13:13.607Z","status":"ssl_error","status_checked_at":"2026-01-16T03:11:47.863Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compression","deep-learning","image-classification","keras","python","remote-sensing","spatial-data","tensorflow","vitis-ai"],"created_at":"2026-01-16T04:01:21.439Z","updated_at":"2026-01-16T04:01:21.510Z","avatar_url":"https://github.com/tum-bgd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compression Supports Spatial Deep Learning\n\n\n\n## Abstract\nIn the last decades, the domain of spatial computing became more and more data-driven, especially when using remote sensing-based images. Furthermore, the satellites provide huge amounts of images, so the number of available datasets is increasing. This leads to the need for large storage requirements and high computational costs when estimating the label scene classification problem using deep learning. This consumes and blocks important hardware recourses, energy, and time. In this paper, the use of aggressive compression algorithms will be discussed to cut the wasted transmission and resources for selected land cover classification problems. To compare the different compression methods and the classification performance, the satellite image patches are compressed by two methods. The first method is the image quantization of the data to reduce the bit depth. Second is the lossy and lossless compression of images with the use of image file formats, such as JPEG and TIFF. The performance of the classification is evaluated with the use of convolutional neural networks like VGG16. The experiments indicated that not all remote sensing image classification problems improve their performance when taking the full available information into account. Moreover, compression can set the focus on specific image features, leading to fewer storage needs and a reduction of computing time with comparably small costs in terms of quality and accuracy. All in all, quantization and embedding into file formats do support convolutional neural networks to estimate the labels of images, by strengthening the features.\n\n![Compression in deep learning - experiment pipline](assets/comp-in-dl.png)\n\n*Figure 1: The pipeline of the experiment to evaluate the impact of the two selected compression methods and their parameters in convolutional neural networks.*\n\n\n## Requirements\nThis project does use public datasets:\n1. EuroSAT - [Source](https://github.com/phelber/eurosat), [Paper no. 1](https://doi.org/10.1109/JSTARS.2019.2918242), [Paper no. 2](https://doi.org/10.1109/IGARSS.2018.8519248)\n2. RSI-CB256 - [Source](https://github.com/lehaifeng/RSI-CB), [Paper](https://doi.org/10.3390/s20061594)\n3. AID - [Source](https://captain-whu.github.io/AID/), [Paper](https://doi.org/10.1109/TGRS.2017.2685945)\n\nThose datasets need to be downloaded and split into three subsets, one training set (folder name: train), one validation set (folder name: val_0), and one test set (folder name: val_1). The path to those datasets needs to be adjusted in `./set_env.sh`.\n\nAdditionally, Docker should be available to run perform the training and deploy the models.\n\n## Run Experiments\nThis section shows the steps to pre-process the data, train, and deploy the data.  \n\n### Step 1: Data pre-processing \nDuring the pre-processing, the data is quantization followed by an embedding into selected file formats. \n\nNote that the data needs to be downloaded manually, before performing the following steps. \n\n**Quantization**:\nTo quantize the data use the file `quantize.py`\n```console\nuser@hostnmame:~$ source ./*.sh \u003cdataset name\u003e \u003cdata root path\u003e \"\n```\nThis step quantizes the dataset to 1,2,3,4,5,6,7,8 bit per channel. \n\n**Image Embedding**:\nNext, the images need to be embedded into several file formats. Converters for the file formats JPEG, PNG, TIFF, PPM, and BMP are provided. The scripts can be used with\n```console\nuser@hostnmame:~$ source ./*.sh \u003cin\u003e \u003coutput\u003e \u003cquality factor\u003e\n```\n\ndetails see: [_data/](_data/)\n\n### Step 2: Training the models\n\nThe models are trained using the scripts in the folder `./01_train/`. \nIn order to train a model with specific parameters, a config file is required, this does look like the file is ./01_train/config/sample.json:\n\nTo train all configurations in one folder, the file `train.sh` starts a docker container and trains the model using TensorFlow.\n \n```console\nuser@hostnmame:~$ source ./train.sh \u003cpath\u003e\n```\n\ndetails see: [01_train/](01_train/)\n\n\n### Step 3: Deploy to custom hardware (Xilinx ZCU102)\nThis step deploys the trained models of a hardware accelerator, specifically an FPGA from type Xilinx ZCU102 using the scripts in the folder `./02_deploy/`.\n\nTo deploy a model TensorFlow model to FPGA , run the script `deploy.sh`\n```console\nuser@hostnmame:~$ source ./deploy.sh \u003cdataset path\u003e \u003cmodel path\u003e \u003ctarget name\u003e\n```\n\ndetails see: [02_deploy/](02_deploy/)\n\n\n## Citation\nThis project has been accepted to IEEE JSTARS and is currently in the publication process. \n\nBibtex will be added as soon as the paper is online available. \n\n## Contact\nGabriel Dax: [gabriel.dax@tum.de](mailto:gabriel.dax@tum.de)   \u003c/br\u003e\nMartin Werner: [martin.werner@tum.de](mailto:martin.werner@tum.de)  \n\nTechnical University of Munich \u003c/br\u003e\nDepartment of Aerospace and Geodesy \u003c/br\u003e\nProfessorship of Big Geospatial Data Management \u003c/br\u003e\nWebsite:  [https://www.bgd.ed.tum.de/](https://www.bgd.ed.tum.de/en/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftum-bgd%2Fcompression-in-dl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftum-bgd%2Fcompression-in-dl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftum-bgd%2Fcompression-in-dl/lists"}