├── LICENSE ├── README.md ├── SpaceNet SAR-RGB-Fusion.ipynb └── requirements.txt /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SAR-RGB-DataFusion 2 | A small codebase featuring a few elementary methods for SAR and Optical imagery data fusion 3 | -------------------------------------------------------------------------------- /SpaceNet SAR-RGB-Fusion.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# SpaceNet Optical-SAR Fusion\n", 8 | "#### Created by Jason Brown and Jake Shermeyer" 9 | ] 10 | }, 11 | { 12 | "cell_type": "markdown", 13 | "metadata": {}, 14 | "source": [ 15 | "### Imports" 16 | ] 17 | }, 18 | { 19 | "cell_type": "code", 20 | "execution_count": null, 21 | "metadata": {}, 22 | "outputs": [], 23 | "source": [ 24 | "# Make the notebook interactive\n", 25 | "%matplotlib notebook\n", 26 | "\n", 27 | "# Required libraries\n", 28 | "import numpy as np\n", 29 | "from scipy import fftpack\n", 30 | "from skimage import io \n", 31 | "from skimage import transform\n", 32 | "import skimage.color as color\n", 33 | "from matplotlib import pyplot as plt \n", 34 | "from scipy.ndimage.filters import uniform_filter\n", 35 | "from scipy.ndimage.measurements import variance\n", 36 | "import spectral as spy\n", 37 | "import gdal\n", 38 | "import os\n", 39 | "import glob\n", 40 | "from tqdm.notebook import tqdm" 41 | ] 42 | }, 43 | { 44 | "cell_type": "markdown", 45 | "metadata": {}, 46 | "source": [ 47 | "The imagery data used here should be the corresponding SpaceNet 6 PS-RGB and SAR Intensity tiles. https://spacenet.ai/sn6-challenge/" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "### Contrast Stretch function" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": null, 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [ 63 | "def stretch(bands, lower_percent=1, higher_percent=98):\n", 64 | " np.ma.array(bands, mask=np.isnan(bands))\n", 65 | " out = np.zeros_like(bands)\n", 66 | " a = 0 \n", 67 | " b = 255 \n", 68 | " c = np.percentile(bands, lower_percent)\n", 69 | " d = np.percentile(bands, higher_percent) \n", 70 | " t = a + (bands - c) * (b - a) / (d - c) \n", 71 | " t[tb] = b\n", 73 | " out = t\n", 74 | " return out.astype(np.uint8)" 75 | ] 76 | }, 77 | { 78 | "cell_type": "markdown", 79 | "metadata": {}, 80 | "source": [ 81 | "### Lee Filter Function for Speckle Filtering" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "metadata": {}, 88 | "outputs": [], 89 | "source": [ 90 | "def lee_filter(img, size):\n", 91 | " img_mean = uniform_filter(img, (size, size))\n", 92 | " img_sqr_mean = uniform_filter(img**2, (size, size))\n", 93 | " img_variance = img_sqr_mean - img_mean**2\n", 94 | " overall_variance = variance(img)\n", 95 | " img_weights = img_variance / (img_variance + overall_variance)\n", 96 | " img_output = img_mean + img_weights * (img - img_mean)\n", 97 | " return img_output " 98 | ] 99 | }, 100 | { 101 | "cell_type": "markdown", 102 | "metadata": {}, 103 | "source": [ 104 | "### PCT function for Polarimetric bands" 105 | ] 106 | }, 107 | { 108 | "cell_type": "code", 109 | "execution_count": null, 110 | "metadata": {}, 111 | "outputs": [], 112 | "source": [ 113 | "### Principal components calculated from the Spectral package: https://github.com/spectralpython/spectral\n", 114 | "def pct_image(img, eigs):\n", 115 | " pc = spy.principal_components(img)\n", 116 | " ch = pc.reduce(eigs=eigs) # select the desired principal component\n", 117 | " img_pc = ch.transform(img) # transform principal component into an image\n", 118 | " return img_pc" 119 | ] 120 | }, 121 | { 122 | "cell_type": "markdown", 123 | "metadata": {}, 124 | "source": [ 125 | "### Build the Span image" 126 | ] 127 | }, 128 | { 129 | "cell_type": "code", 130 | "execution_count": null, 131 | "metadata": {}, 132 | "outputs": [], 133 | "source": [ 134 | "def span_image(img):\n", 135 | " img_sp = img[:,:,0]**2 + 2*abs(img[:,:,1]) + img[:,:,3]**2\n", 136 | " return img_sp" 137 | ] 138 | }, 139 | { 140 | "cell_type": "markdown", 141 | "metadata": {}, 142 | "source": [ 143 | "### Fuse data sources" 144 | ] 145 | }, 146 | { 147 | "cell_type": "code", 148 | "execution_count": null, 149 | "metadata": {}, 150 | "outputs": [], 151 | "source": [ 152 | "def fusion(rgb, sar, method='hsv'):\n", 153 | " # Get rgb_bands\n", 154 | " R = rgb[:,:,0] # red\n", 155 | " G = rgb[:,:,1] # green\n", 156 | " B = rgb[:,:,2] # blue \n", 157 | " image = None\n", 158 | " if method == 'simple_mean':\n", 159 | " r = 0.5 * (0.5*R + sar)[:, :, np.newaxis]\n", 160 | " g = 0.5 * (0.5*G + sar)[:, :, np.newaxis]\n", 161 | " b = 0.5 * (0.5*B + sar)[:, :, np.newaxis]\n", 162 | " image = np.concatenate([r,g,b], axis=2) \n", 163 | " if method == 'hsv':\n", 164 | " hsv = color.rgb2hsv(rgb)\n", 165 | " hsv[:,:,2] = sar \n", 166 | " image = color.hsv2rgb(hsv)\n", 167 | " return image " 168 | ] 169 | }, 170 | { 171 | "cell_type": "markdown", 172 | "metadata": {}, 173 | "source": [ 174 | "### Main processing code block" 175 | ] 176 | }, 177 | { 178 | "cell_type": "code", 179 | "execution_count": null, 180 | "metadata": {}, 181 | "outputs": [], 182 | "source": [ 183 | "def create_multiband_geotiff(array, out_name, proj, geo, nodata=0, out_format=gdal.GDT_Byte, verbose=False):\n", 184 | " \"\"\"Convert an array to an output georegistered geotiff.\n", 185 | " Arguments\n", 186 | " ---------\n", 187 | " array : numpy array\n", 188 | " A numpy array with a the shape: [Channels, X, Y] or [X, Y]\n", 189 | " out_name : str\n", 190 | " The output name and path for your image\n", 191 | " proj : gdal projection\n", 192 | " A projection, can be extracted from an image opened with gdal with image.GetProjection(). Can be set to None if no georeferencing is required.\n", 193 | " geo : gdal geotransform\n", 194 | " A gdal geotransform which indicates the position of the image on the earth in projection units. Can be set to None if no georeferencing is required.\n", 195 | " Can be extracted from an image opened with gdal with image.GetGeoTransform()\n", 196 | " nodata : int, default - 0\n", 197 | " A value to set transparent for GIS systems. Can be set to None if the nodata value is not required.\n", 198 | " out_format : gdalconst\n", 199 | " https://gdal.org/python/osgeo.gdalconst-module.html\n", 200 | " Must be one of the variables listed in the docs above\n", 201 | " verbose : bool\n", 202 | " A verbose output, printing all inputs and outputs to the function. Useful for debugging.\n", 203 | " \"\"\"\n", 204 | " driver = gdal.GetDriverByName('GTiff')\n", 205 | " if len(array.shape) == 2:\n", 206 | " array = array[np.newaxis, ...]\n", 207 | " os.makedirs(os.path.dirname(os.path.abspath(out_name)), exist_ok=True)\n", 208 | " dataset = driver.Create(out_name, array.shape[2], array.shape[1], array.shape[0], out_format)\n", 209 | " if verbose is True:\n", 210 | " print(\"Array Shape, should be [Channels, X, Y] or [X,Y]:\", array.shape)\n", 211 | " print(\"Output Name:\", out_name)\n", 212 | " print(\"Projection:\", proj)\n", 213 | " print(\"GeoTransform:\", geo)\n", 214 | " print(\"NoData Value:\", nodata)\n", 215 | " print(\"Bit Depth:\", out_format)\n", 216 | " if proj is not None:\n", 217 | " dataset.SetProjection(proj)\n", 218 | " if geo is not None:\n", 219 | " dataset.SetGeoTransform(geo)\n", 220 | " if nodata is None:\n", 221 | " for i, image in enumerate(array, 1):\n", 222 | " dataset.GetRasterBand(i).WriteArray(image)\n", 223 | " del dataset\n", 224 | " else:\n", 225 | " for i, image in enumerate(array, 1):\n", 226 | " dataset.GetRasterBand(i).WriteArray(image)\n", 227 | " dataset.GetRasterBand(i).SetNoDataValue(nodata)\n", 228 | " del dataset\n", 229 | "\n", 230 | "def color_sar(sar_tiles_dir, rgb_tiles_dir, tiles_out_dir, search='.tif', method='hsv', span_or_pca='span', filtersize=3, nodata=0, add_4th=False):\n", 231 | " \"\"\"Colorizes SAR data using co-located RGB imagery and outputs it to the tiles_out_dir.\n", 232 | " Arguments\n", 233 | " ---------\n", 234 | " sar_tiles_dir : str\n", 235 | " Path to the directory that contains SAR data\n", 236 | " rgb_tiles_dir : str\n", 237 | " Path to the directory that contains RGB data\n", 238 | " tiles_out_dir : str\n", 239 | " Path to the directory where colorized SAR will be output\n", 240 | " search : str\n", 241 | " File extension of imagery, defaults to '.tif'\n", 242 | " method : str\n", 243 | " Colorization method, should be 'hsv' or 'simple_mean'. Defaults to 'hsv.'\n", 244 | " span_or_pca : str\n", 245 | " Calculate a span image or use pca to convert SAR to single channel. Should be 'span' or 'pca.'\n", 246 | " Defaults to 'span.'\n", 247 | " nodata : int\n", 248 | " A value to set transparent for GIS systems. Can be set to None if the nodata value is not required.\n", 249 | " Defaults to 0.\n", 250 | " filtersize : int\n", 251 | " The filter size for a lee filter to reduce image noise.\n", 252 | " add_4th : bool\n", 253 | " Add an artificial 4th channel for working with networks that expect 4 channel inputs. Defaults to 'False'.\n", 254 | " \"\"\"\n", 255 | " if not os.path.exists(tiles_out_dir):\n", 256 | " os.makedirs(tiles_out_dir)\n", 257 | " os.chdir(sar_tiles_dir)\n", 258 | " search2 = \"*\" + search\n", 259 | " images = glob.glob(search2)\n", 260 | " for image in tqdm(images):\n", 261 | " sarimg = gdal.Open(image)\n", 262 | " proj = sarimg.GetProjection()\n", 263 | " geo = sarimg.GetGeoTransform()\n", 264 | " sarimg = sarimg.ReadAsArray()\n", 265 | " sarimg = np.swapaxes(sarimg,0,2)\n", 266 | " sarimg = np.swapaxes(sarimg,0,1)\n", 267 | " if sarimg.shape[2] > 1:\n", 268 | " if span_or_pca == 'span':\n", 269 | " span_img = span_image(sarimg)\n", 270 | " elif span_or_pca == 'pca':\n", 271 | " span_img = pct_image(sarimg, 0)\n", 272 | " else:\n", 273 | " print(\"Choose 'span' or 'pca' for span_or_pca\")\n", 274 | " else:\n", 275 | " span_img = sarimg[0,:,:]\n", 276 | " new_image = image.split(\"SAR-Intensity\")[0] + \"PS-RGB\" + image.split(\"SAR-Intensity\")[1]\n", 277 | " rgb_file = os.path.join(rgb_tiles_dir, new_image)\n", 278 | " rgbimg = io.imread(rgb_file).astype(np.float32)\n", 279 | " sarimg_hgm = transform.match_histograms(span_img, rgbimg[:,:,1])\n", 280 | " lee_filt_img = lee_filter(sarimg_hgm, filtersize)\n", 281 | " eo_sar_fusion = fusion(rgbimg, lee_filt_img, method=method) # see above for various methods available\n", 282 | " eo_sar_fusion = np.swapaxes(eo_sar_fusion,1,0)\n", 283 | " eo_sar_fusion = np.swapaxes(eo_sar_fusion,2,0)\n", 284 | " output_image = image.split(\"SAR-Intensity\")[0] + \"SAR-Intensity-Colorized-HSV\" + image.split(\"SAR-Intensity\")[1]\n", 285 | " output_image = os.path.join(tiles_out_dir, output_image)\n", 286 | " if add_4th is True:\n", 287 | " eo_sar_fusion = np.stack([eo_sar_fusion[0,:,:], eo_sar_fusion[1,:,:], eo_sar_fusion[2,:,:], eo_sar_fusion[0,:,:]])\n", 288 | " create_multiband_geotiff(eo_sar_fusion, output_image, proj, geo, nodata=nodata)" 289 | ] 290 | }, 291 | { 292 | "cell_type": "markdown", 293 | "metadata": {}, 294 | "source": [ 295 | "Inputs and run function:" 296 | ] 297 | }, 298 | { 299 | "cell_type": "code", 300 | "execution_count": null, 301 | "metadata": {}, 302 | "outputs": [], 303 | "source": [ 304 | "sar_tiles_dir = \"../train/AOI_11_Rotterdam/SAR-Intensity\"\n", 305 | "rgb_tiles_dir = \"../train/AOI_11_Rotterdam/PS-RGB\"\n", 306 | "tiles_out_dir = \"../train/AOI_11_Rotterdam/Fused-RGB-SAR\"" 307 | ] 308 | }, 309 | { 310 | "cell_type": "code", 311 | "execution_count": null, 312 | "metadata": {}, 313 | "outputs": [], 314 | "source": [ 315 | "color_sar(sar_tiles_dir, rgb_tiles_dir, tiles_out_dir, search='.tif', method='hsv', span_or_pca='span', filtersize=3, nodata=0, add_4th=False)" 316 | ] 317 | }, 318 | { 319 | "cell_type": "code", 320 | "execution_count": null, 321 | "metadata": {}, 322 | "outputs": [], 323 | "source": [] 324 | } 325 | ], 326 | "metadata": { 327 | "kernelspec": { 328 | "display_name": "Python 3", 329 | "language": "python", 330 | "name": "python3" 331 | }, 332 | "language_info": { 333 | "codemirror_mode": { 334 | "name": "ipython", 335 | "version": 3 336 | }, 337 | "file_extension": ".py", 338 | "mimetype": "text/x-python", 339 | "name": "python", 340 | "nbconvert_exporter": "python", 341 | "pygments_lexer": "ipython3", 342 | "version": "3.7.6" 343 | } 344 | }, 345 | "nbformat": 4, 346 | "nbformat_minor": 2 347 | } 348 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | #Requirements 2 | numpy 3 | scipy 4 | scikit-image 5 | matplotlib 6 | spectral 7 | gdal 8 | tqdm 9 | --------------------------------------------------------------------------------