{ "info": { "author": "Lianfa Li", "author_email": "lspatial@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# Library for Deep Residual Multiscale Segmenter (resmcseg)\n\n[![Build Status](https://travis-ci.org/pybind/cmake_example.svg?branch=master)](https://travis-ci.org/pybind/cmake_example)\n[![Build status](https://ci.appveyor.com/api/projects/status/57nnxfm4subeug43/branch/master?svg=true)](https://ci.appveyor.com/project/dean0x7d/cmake-example/branch/master)\n\nThe python library of Deep Residual Multiscale Segmenter (autonet). \nCurrent version just supports the KERAS package of deep learning and \nwill extend to the others in the future. \n\n## Major modules\n\n**model**\n\n* gResMCSeg: major class to obtain a deep extensive residual multiscale \n FCN. You can setup its aruments. See the class and its \n member functions' help for details. \n* gResMCSegPre: major class to make semantic segmentation for binary and multi class. \n* pretrainedmodel: function to download the pretrained models using the DSTL and \n ZURICH datasets from the Google cloud \n\n**util**\n\n* segmetrics: main metrics including jaccard index, MIoU, and loss functions etc.\n* helper: helper functions including color mapping etc. \n\n**data**\n\n* data: function to access one image for Zurich to test the model's prediction. \n \n## Installation\n\nYou can directly install it using the following command for the latest version:\n\n```bash\nsudo pip install resmcseg\n```\n\n## Note for installation and use \n\n**Compiler requirements**\n\nresmcseg requires a C++11 compliant compiler to be available.\n\n**Runtime requirements**\n\nresmcseg requires installation of Keras with support of Tensorflow as the \nbackend system of deep learning (to support Keras). Also Pandas and Numpy should \nbe installed. \nSpecifics: Keras>=2.2.2; opencv2>=3.4.1,tensorflow,numpy,sklearn, pandas,\n gdal,tifffile etc. \n\n## Use case \nThe homepage of the github for the package, resmcseg provides specific \nexamples for use of the library: \nhttps://github.com/lspatial/resmcsegpub \n\n## License\n\nThe resmcseg is provided under a MIT license that can be found in the LICENSE\nfile. By using, distributing, or contributing to this project, you agree to the\nterms and conditions of this license.\n\n## Test call\n\n```python\nimport os\nimport cv2\nfrom keras.models import load_model,model_from_json\nfrom resmcseg.util.segmetrics import compute_iou,jaccard,mean_iouC,miou,mean_iou\nfrom resmcseg.model.gresmcseg_pre import gResMCSegPre\nfrom resmcseg.model.resizelayer import ResizeLayer\nfrom resmcseg.model.pretrainedmodel import downloadPretrainedModel\nfrom resmcseg.util.helper import bce_dice_loss,jaccard_coef,jaccard_coef_int,jaccard_coef1\nfrom resmcseg.util.helper import onehot_to_rgb,color_dict\nfrom resmcseg.data import dload\n\nmodelFl='/tmp/model_strwei.h5'\nif not os.path.isfile(modelFl):\n downloadPretrainedModel('ZURICH',destination=modelFl)\nmodel = load_model(modelFl,custom_objects={'ResizeLayer': ResizeLayer,'bce_dice_loss':bce_dice_loss,\n 'mean_iou':mean_iou,'jaccard_coef':jaccard_coef, 'jaccard_coef1':jaccard_coef1,'miou':miou,\n 'jaccard_coef_int':jaccard_coef_int,'mean_iouC': mean_iouC})\nppre=gResMCSegPre(patchsize=224,bordersize=16,overprop=0.3)\nimg, mask = dload()\nimgres = ppre.preAImgMulti(img, model, 9)\nmskImg = onehot_to_rgb(imgres, color_dict)\nfpath = \"/tmp/zurich1img_pre.jpg\"\ncv2.imwrite(fpath, cv2.cvtColor(mskImg, cv2.COLOR_RGB2BGR), [int(cv2.IMWRITE_JPEG_QUALITY), 100])\ny_pred = imgres.flatten()\ny_true = mask.flatten()\niou = compute_iou(imgres, mask)\njacard = jaccard(imgres, mask)\nprint(\"iou : \" + str(iou) + '; jacard is ', jacard)\n\n```\n## Collaboration\n\nWelcome to contact Dr. Lianfa Li (Email: lspatial@gmail.com or lilf@lreis.ac.cn).", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "resmcseg", "package_url": "https://pypi.org/project/resmcseg/", "platform": "", "project_url": "https://pypi.org/project/resmcseg/", "project_urls": null, "release_url": "https://pypi.org/project/resmcseg/0.1.65/", "requires_dist": null, "requires_python": "", "summary": "Library for Deep Residual Multiscale Segmenter", "version": "0.1.65" }, "last_serial": 5631243, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "4d589e1e2167a09b6e65d5b3717059b2", "sha256": "9bcb3466e53d20d54a8187d72bdeb493ae85b26e89955ed9ef05ba85e8a81b78" }, "downloads": -1, "filename": "resmcseg-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4d589e1e2167a09b6e65d5b3717059b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6568417, "upload_time": "2019-08-03T06:34:30", "url": "https://files.pythonhosted.org/packages/f4/68/98fc3a4cf077c678fbc4588d41ae557e4942d0f953cc57905bc8a6ad44f6/resmcseg-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "493af0f14e38627051194d91ae1dd005", "sha256": "9e445f32032d9df27588d06e5be4c8e080374ebe68e91f22d7c6f651b1bb69b9" }, "downloads": -1, "filename": "resmcseg-0.1.3.tar.gz", "has_sig": false, "md5_digest": "493af0f14e38627051194d91ae1dd005", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6576109, "upload_time": "2019-08-03T15:09:35", "url": "https://files.pythonhosted.org/packages/e5/e8/8d420c92033395207d86b2a4a47e8717821409b9701fffdbfb8c56da814e/resmcseg-0.1.3.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "13575cff4f58cb22bb75e04d570c67bf", "sha256": "c529f2964055d3b3dc1524284d32ecb2599be452000c3b06b80dab6a811e6ee9" }, "downloads": -1, "filename": "resmcseg-0.1.6.tar.gz", "has_sig": false, "md5_digest": "13575cff4f58cb22bb75e04d570c67bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6576096, "upload_time": "2019-08-04T17:33:02", "url": "https://files.pythonhosted.org/packages/02/9e/09a431c622634aaa0e0c78dc075a145275944692fd00e1970a9dbf28bfa0/resmcseg-0.1.6.tar.gz" } ], "0.1.61": [ { "comment_text": "", "digests": { "md5": "10ed90be2ca23523643ec8f7d3b4f73e", "sha256": "1bad676b7ff821366a838cfc0634882b511b4d1415c8ac6dd3203d966a0b8f8d" }, "downloads": -1, "filename": "resmcseg-0.1.61.tar.gz", "has_sig": false, "md5_digest": "10ed90be2ca23523643ec8f7d3b4f73e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6576134, "upload_time": "2019-08-04T17:39:07", "url": "https://files.pythonhosted.org/packages/8d/71/b7dd2c61e28e11d8a5e09fb9bc041c3e96bacf57c1461083360ee6f0ee9a/resmcseg-0.1.61.tar.gz" } ], "0.1.62": [ { "comment_text": "", "digests": { "md5": "5f9e51f577be29c6e003232b83443475", "sha256": "c0f78d7cd6566afdb347eeb4aee50dbc4b9cf1f9c9e4282118f6b32bfb557f13" }, "downloads": -1, "filename": "resmcseg-0.1.62.tar.gz", "has_sig": false, "md5_digest": "5f9e51f577be29c6e003232b83443475", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577624, "upload_time": "2019-08-04T18:02:58", "url": "https://files.pythonhosted.org/packages/bd/7f/590a2a10ab2d53a66826fd8c098d60bb5217c3e0f7655d5a89bf46c6e57f/resmcseg-0.1.62.tar.gz" } ], "0.1.63": [ { "comment_text": "", "digests": { "md5": "9881e855d20e11812f36d196051848d4", "sha256": "a65bfc9ef3ef69eb8b95badfe894838f932eab431e53210be0b0b45f4cf7cc1a" }, "downloads": -1, "filename": "resmcseg-0.1.63.tar.gz", "has_sig": false, "md5_digest": "9881e855d20e11812f36d196051848d4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577741, "upload_time": "2019-08-04T18:12:20", "url": "https://files.pythonhosted.org/packages/f7/1b/7ebf0e489d128dffa04dd603338b6c92b783762fc8294f6274506101e3ea/resmcseg-0.1.63.tar.gz" } ], "0.1.64": [ { "comment_text": "", "digests": { "md5": "19dff4f6a7afb68d9d6459cedf0ddef1", "sha256": "1e663a8a7c5bc45a33db70423e5095b3d13e345463fafedc70ba99c85f7790ea" }, "downloads": -1, "filename": "resmcseg-0.1.64.tar.gz", "has_sig": false, "md5_digest": "19dff4f6a7afb68d9d6459cedf0ddef1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577736, "upload_time": "2019-08-04T18:16:13", "url": "https://files.pythonhosted.org/packages/55/5c/41b6c966097525e504cc3bf6ed5e2c7e6cafd9a935ac55bbf139dfbd79a7/resmcseg-0.1.64.tar.gz" } ], "0.1.65": [ { "comment_text": "", "digests": { "md5": "73a11927fd15f6b3db4daef2fcc9f8c6", "sha256": "34c94bcaa7d41ad92c834ec7706aaa5f39a4ddece7ed72a71f8c04b9a4a307b4" }, "downloads": -1, "filename": "resmcseg-0.1.65.tar.gz", "has_sig": false, "md5_digest": "73a11927fd15f6b3db4daef2fcc9f8c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577733, "upload_time": "2019-08-04T18:28:53", "url": "https://files.pythonhosted.org/packages/52/4d/8a747a0b97a133b8693772950ab421d5536728d8e5df4190027dd659e4c0/resmcseg-0.1.65.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "73a11927fd15f6b3db4daef2fcc9f8c6", "sha256": "34c94bcaa7d41ad92c834ec7706aaa5f39a4ddece7ed72a71f8c04b9a4a307b4" }, "downloads": -1, "filename": "resmcseg-0.1.65.tar.gz", "has_sig": false, "md5_digest": "73a11927fd15f6b3db4daef2fcc9f8c6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6577733, "upload_time": "2019-08-04T18:28:53", "url": "https://files.pythonhosted.org/packages/52/4d/8a747a0b97a133b8693772950ab421d5536728d8e5df4190027dd659e4c0/resmcseg-0.1.65.tar.gz" } ] }