[GRASS-SVN] r73605 - grass-addons/grass7/imagery/i.ann.maskrcnn/i.ann.maskrcnn.detect

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 23 08:45:55 PDT 2018


Author: pesekon2
Date: 2018-10-23 08:45:55 -0700 (Tue, 23 Oct 2018)
New Revision: 73605

Modified:
   grass-addons/grass7/imagery/i.ann.maskrcnn/i.ann.maskrcnn.detect/i.ann.maskrcnn.detect.py
Log:
handling band* parameter for py3 background GRASS

Modified: grass-addons/grass7/imagery/i.ann.maskrcnn/i.ann.maskrcnn.detect/i.ann.maskrcnn.detect.py
===================================================================
--- grass-addons/grass7/imagery/i.ann.maskrcnn/i.ann.maskrcnn.detect/i.ann.maskrcnn.detect.py	2018-10-23 14:42:09 UTC (rev 73604)
+++ grass-addons/grass7/imagery/i.ann.maskrcnn/i.ann.maskrcnn.detect/i.ann.maskrcnn.detect.py	2018-10-23 15:45:55 UTC (rev 73605)
@@ -111,9 +111,14 @@
         imagesDir = options['images_directory']
         modelPath = options['model']
         classes = options['classes'].split(',')
-        band1 = options['band1'].split(',')
-        band2 = options['band2'].split(',')
-        band3 = options['band3'].split(',')
+        if options['band1']:
+            band1 = options['band1'].split(',')
+            band2 = options['band2'].split(',')
+            band3 = options['band3'].split(',')
+        else:
+            band1 = list()
+            band2 = list()
+            band3 = list()
         outputType = options['output_type']
         if options['images_format']:
             extension = options['images_format']
@@ -383,7 +388,7 @@
     """
     Create a raster from results of detection and import it into GRASS GIS or
     save to a temporal directory to wait for external georeferencing.
-    
+
     :param image: [band1, band2, band3]
     :param boxes: [num_instance, (y1, x1, y2, x2, class_id)] in image
         coordinates



More information about the grass-commit mailing list