diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 1aa226c4..cdc2cf28 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/getting_started.doctree b/docs/_build/doctrees/getting_started.doctree index f186cad9..a5159ea0 100644 Binary files a/docs/_build/doctrees/getting_started.doctree and b/docs/_build/doctrees/getting_started.doctree differ diff --git a/docs/_build/doctrees/source/deepforest.doctree b/docs/_build/doctrees/source/deepforest.doctree index d84f4d69..e1398ee2 100644 Binary files a/docs/_build/doctrees/source/deepforest.doctree and b/docs/_build/doctrees/source/deepforest.doctree differ diff --git a/docs/_build/doctrees/source/tests.doctree b/docs/_build/doctrees/source/tests.doctree index 50a8d3f9..3d0b88aa 100644 Binary files a/docs/_build/doctrees/source/tests.doctree and b/docs/_build/doctrees/source/tests.doctree differ diff --git a/docs/_build/doctrees/training.doctree b/docs/_build/doctrees/training.doctree index 27c470df..d8f966f4 100644 Binary files a/docs/_build/doctrees/training.doctree and b/docs/_build/doctrees/training.doctree differ diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 3364d6c7..59906763 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 0305af20906d6896821bb9bc0bb6deb4 +config: 4d8dcf2e89c6db216a76d6f7b3564598 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_modules/deepforest/cli.html b/docs/_build/html/_modules/deepforest/cli.html index 6ae91db5..6480ece1 100644 --- a/docs/_build/html/_modules/deepforest/cli.html +++ b/docs/_build/html/_modules/deepforest/cli.html @@ -8,7 +8,7 @@ - deepforest.cli — DeepForest 0.0.3 documentation + deepforest.cli — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_modules/deepforest/deepforest.html b/docs/_build/html/_modules/deepforest/deepforest.html index 38e89862..4908250d 100644 --- a/docs/_build/html/_modules/deepforest/deepforest.html +++ b/docs/_build/html/_modules/deepforest/deepforest.html @@ -8,7 +8,7 @@ - deepforest.deepforest — DeepForest 0.0.3 documentation + deepforest.deepforest — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
@@ -166,6 +166,7 @@

Source code for deepforest.deepforest

 """
 import os
 from PIL import Image
+import tensorflow as tf
 import pandas as pd
 import numpy as np
 from matplotlib import pyplot as plt
@@ -246,9 +247,12 @@ 

Source code for deepforest.deepforest

             model (object): A trained keras model
         '''        
         #Download latest model from github release
-        weights = utilities.use_release()  
+        release_tag, weights = utilities.use_release()  
+        
+        #load saved model and tag release
+        self.__release_version__ = release_tag
+        print("Loading pre-built model: {}".format(release_tag))
         
-        #load saved model
         self.weights = weights
         self.model = utilities.read_model(self.weights, self.config)
         self.prediction_model = convert_model(self.model)
@@ -299,8 +303,8 @@

Source code for deepforest.deepforest

     
         #name columns and return box data
         boxes_output = pd.concat(boxes_output)
-        boxes_output.columns = ["xmin","ymin","xmax","ymax","plot_name"]
-        boxes_output = boxes_output.reindex(columns= ["plot_name","xmin","ymin","xmax","ymax"])    
+        boxes_output.columns = ["xmin","ymin","xmax","ymax","score","label","plot_name"]
+        boxes_output = boxes_output.reindex(columns= ["plot_name","xmin","ymin","xmax","ymax","score","label"])    
         
         return boxes_output
@@ -370,7 +374,7 @@

Source code for deepforest.deepforest

             return_plot: Whether to return image with annotations overlaid, or just a numpy array of boxes
         
         Returns:
-            predictions (array): if return_plot, an image. Otherwise a numpy array of predicted bounding boxes
+            predictions (array): if return_plot, an image. Otherwise a numpy array of predicted bounding boxes, with scores and labels
         """     
         
         #Check for model save
@@ -397,7 +401,7 @@ 

Source code for deepforest.deepforest

             return_plot: Should the image be returned with the predictions drawn?
         
         Returns:
-            boxes (array): if return_plot, an image. Otherwise a numpy array of predicted bounding boxes
+            boxes (array): if return_plot, an image. Otherwise a numpy array of predicted bounding boxes, scores and labels
         """   
        
         #Load raster as image
@@ -421,7 +425,6 @@ 

Source code for deepforest.deepforest

             
             #transform coordinates to original system
             xmin, ymin, xmax, ymax = windows[index].getRect()
-            boxes = pd.DataFrame(boxes, columns=["xmin","ymin","xmax","ymax"])
             boxes.xmin = boxes.xmin + xmin
             boxes.xmax = boxes.xmax + xmin
             boxes.ymin = boxes.ymin + ymin
@@ -431,16 +434,21 @@ 

Source code for deepforest.deepforest

             
         predicted_boxes = pd.concat(predicted_boxes)
         
-        #TODO overlapping box supression
-        
+        #Non-max supression for overlapping boxes among window 
+        with tf.Session() as sess:
+            new_boxes, new_scores, new_labels = predict.non_max_suppression(sess, predicted_boxes[["xmin","ymin","xmax","ymax"]].values, predicted_boxes.score.values, predicted_boxes.label.values)
+            image_detections = np.concatenate([new_boxes, np.expand_dims(new_scores, axis=1), np.expand_dims(new_labels, axis=1)], axis=1)
+            mosaic_df = pd.DataFrame(image_detections,columns=["xmin","ymin","xmax","ymax","score","label"])
+            mosaic_df.label = mosaic_df.label.str.decode("utf-8")
+            
         if return_plot:
             #Draw predictions
-            for box in predicted_boxes.values:
+            for box in mosaic_df[["xmin","ymin","xmax","ymax"]].values:
                 draw_box(numpy_image, box, [0,0,255])
             
             return numpy_image
         else:
-            return predicted_boxes
+ return mosaic_df
diff --git a/docs/_build/html/_modules/deepforest/predict.html b/docs/_build/html/_modules/deepforest/predict.html index 00da7161..219c9145 100644 --- a/docs/_build/html/_modules/deepforest/predict.html +++ b/docs/_build/html/_modules/deepforest/predict.html @@ -8,7 +8,7 @@ - deepforest.predict — DeepForest 0.0.3 documentation + deepforest.predict — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
@@ -166,31 +166,34 @@

Source code for deepforest.predict

 import keras
 import cv2
 import pandas as pd
+import tensorflow as tf
 
 #Retinanet-viz
 from keras_retinanet.utils import image as keras_retinanet_image
 from keras_retinanet.utils.visualization import draw_detections
 
-
[docs]def label_to_name(label): +#TODO check how this works with multiple classes +
[docs]def label_to_name(image_classes, index): """ Map label to name. """ - return "Tree"
- -
[docs]def predict_image(model, image_path=None, raw_image = None, score_threshold = 0.05, max_detections= 200, return_plot=True): + label = image_classes[index] + return label
+ +
[docs]def predict_image(model, image_path=None, raw_image = None, score_threshold = 0.05, max_detections= 200, return_plot=True, classes = ["Tree"]): """ Predict invidiual tree crown bounding boxes for a single image Args: model (object): A keras-retinanet model to predict bounding boxes, either load a model from weights, use the latest release, or train a new model from scratch. image_path (str): Path to image file on disk - image_path (str): Numpy image array in BGR channel order following openCV convention + raw_image (str): Numpy image array in BGR channel order following openCV convention score_threshold (float): Minimum probability score to be included in final boxes, ranging from 0 to 1. max_detections (int): Maximum number of bounding box predictions per tile return_plot (bool): If true, return a image object, else return bounding boxes as a numpy array Returns: raw_image (array): If return_plot is TRUE, the image with the overlaid boxes is returned - image_boxes: If return_plot is FALSE, the bounding boxes as a 4 column array -> xmin, ymin, xmax, ymax + image_detections: If return_plot is FALSE, a np.array of image_boxes, image_scores, image_labels """ #predict if image_path: @@ -222,42 +225,29 @@

Source code for deepforest.predict

     image_labels     = labels[0, indices[scores_sort]]
     image_detections = np.concatenate([image_boxes, np.expand_dims(image_scores, axis=1), np.expand_dims(image_labels, axis=1)], axis=1)
 
+    df = pd.DataFrame(image_detections, columns = ["xmin","ymin","xmax","ymax","score","label"])
+    #Change numberic class into string label
+    df.label = df.label.astype(int)
+    df.label = df.label.apply(lambda x: classes[x])
+    
     if return_plot:
         draw_detections(raw_image, image_boxes, image_scores, image_labels, label_to_name=label_to_name, score_threshold=score_threshold)
         return raw_image                
     else:
-        return image_boxes
- -
[docs]def prediction_wrapper(image_path): - ##read model - config = read_config() - model = read_model(config["model_path"], config) - prediction = predict_image(model, image_path, score_threshold = 0.1, max_detections= 200,return_plot=True) - save_name = os.path.splitext(image_path)[0] + "_prediction.jpg" - cv2.imwrite(save_name,prediction) - return(save_name)
- -
[docs]def predict_all_images(): - """ - loop through a dir and run all images - """ - #Read config - config = read_config() - - #read model - model = read_model(config["model_path"], config) - tifs = glob.glob(os.path.join("data","**","*.tif")) - for tif in tifs: - print(tif) - prediction = predict_image(model, tif, score_threshold = 0.1, max_detections= 200,return_plot=False) - - #reshape and save to csv - df = pd.DataFrame(prediction) - df.columns = ["xmin","ymin","xmax","ymax"] - - #save boxes - file_path = os.path.splitext(tif)[0] + ".csv" - df.to_csv(file_path)
+ return df
+ +
[docs]def non_max_suppression(sess, boxes, scores, labels, max_output_size=200, iou_threshold=0.25): + ''' + Provide a tensorflow session and get non-maximum suppression + Args: + sess: a tensorfloe + max_output_size, iou_threshold are passed to tf.image.non_max_suppression + ''' + non_max_idxs = tf.image.non_max_suppression(boxes, scores, max_output_size=max_output_size, iou_threshold=iou_threshold) + new_boxes = tf.cast(tf.gather(boxes, non_max_idxs), tf.int32) + new_scores = tf.gather(scores, non_max_idxs) + new_labels = tf.gather(labels, non_max_idxs) + return sess.run([new_boxes, new_scores, new_labels])
diff --git a/docs/_build/html/_modules/deepforest/preprocess.html b/docs/_build/html/_modules/deepforest/preprocess.html index 92f4068a..f520201e 100644 --- a/docs/_build/html/_modules/deepforest/preprocess.html +++ b/docs/_build/html/_modules/deepforest/preprocess.html @@ -8,7 +8,7 @@ - deepforest.preprocess — DeepForest 0.0.3 documentation + deepforest.preprocess — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
@@ -224,24 +224,34 @@

Source code for deepforest.preprocess

         (annotations.ymin < (window_ymax)) &  
         (annotations.ymax > (window_ymin)) &                
         (annotations.ymax < (window_ymax + offset))].copy()
-    
+        
     #change the image name
     image_name = os.path.splitext("{}".format(annotations.image_path.unique()[0]))[0]
     image_basename = os.path.splitext(image_name)[0]
     selected_annotations.image_path = "{}_{}.jpg".format(image_basename,index) 
     
-    #update coordinates with respect to origin
-    selected_annotations.xmax = (selected_annotations.xmin - window_xmin)  + (selected_annotations.xmax - selected_annotations.xmin)    
-    selected_annotations.xmin = (selected_annotations.xmin - window_xmin)
-    selected_annotations.ymax = (selected_annotations.ymin - window_ymin)  + (selected_annotations.ymax - selected_annotations.ymin)    
-    selected_annotations.ymin = (selected_annotations.ymin - window_ymin)
-    
-    #cut off any annotations over the border.
-    selected_annotations.xmin[selected_annotations.xmin < 0] = 0
-    selected_annotations.xmax[selected_annotations.xmax > w] = w   
-    selected_annotations.ymin[selected_annotations.ymin < 0] = 0
-    selected_annotations.ymax[selected_annotations.ymax > h] = h   
-    
+    #If no matching annotations, return a line with the image name, but no records
+    if selected_annotations.empty:
+        selected_annotations = pd.DataFrame(["{}_{}.jpg".format(image_basename,index)],columns=["image_path"])
+        selected_annotations["xmin"] = ""
+        selected_annotations["ymin"] = ""
+        selected_annotations["xmax"] = ""
+        selected_annotations["ymax"] = ""
+        selected_annotations["label"] = ""
+        
+    else:
+        #update coordinates with respect to origin
+        selected_annotations.xmax = (selected_annotations.xmin - window_xmin)  + (selected_annotations.xmax - selected_annotations.xmin)    
+        selected_annotations.xmin = (selected_annotations.xmin - window_xmin)
+        selected_annotations.ymax = (selected_annotations.ymin - window_ymin)  + (selected_annotations.ymax - selected_annotations.ymin)    
+        selected_annotations.ymin = (selected_annotations.ymin - window_ymin)
+        
+        #cut off any annotations over the border.
+        selected_annotations.xmin[selected_annotations.xmin < 0] = 0
+        selected_annotations.xmax[selected_annotations.xmax > w] = w   
+        selected_annotations.ymin[selected_annotations.ymin < 0] = 0
+        selected_annotations.ymax[selected_annotations.ymax > h] = h   
+        
     return selected_annotations
[docs]def save_crop(base_dir, image_name, index, crop): @@ -282,13 +292,13 @@

Source code for deepforest.preprocess

     #Get image name for indexing
     image_name = os.path.basename(path_to_raster)
     
-    # Load annotations file
+    # Load annotations file and coerce dtype
     annotations = pd.read_csv(annotations_file)
     
     #open annotations file
     image_annotations = annotations[annotations.image_path == image_name].copy()
     
-    if not annotations.shape[1]==6:
+    if not annotations.shape[1] == 6:
         raise ValueError("Annotations file has {} columns, should have format image_path, xmin, ymin, xmax, ymax, label".format(annotations.shape[1]))
             
     annotations_files = []
diff --git a/docs/_build/html/_modules/deepforest/retinanet_train.html b/docs/_build/html/_modules/deepforest/retinanet_train.html
index ce1cd5b0..0202ccf0 100644
--- a/docs/_build/html/_modules/deepforest/retinanet_train.html
+++ b/docs/_build/html/_modules/deepforest/retinanet_train.html
@@ -8,7 +8,7 @@
   
   
   
-  deepforest.retinanet_train — DeepForest 0.0.3 documentation
+  deepforest.retinanet_train — DeepForest 0.1.0 documentation
   
 
   
@@ -59,7 +59,7 @@
             
             
               
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_modules/deepforest/tfrecords.html b/docs/_build/html/_modules/deepforest/tfrecords.html index 7255ab7b..87fbfa22 100644 --- a/docs/_build/html/_modules/deepforest/tfrecords.html +++ b/docs/_build/html/_modules/deepforest/tfrecords.html @@ -8,7 +8,7 @@ - deepforest.tfrecords — DeepForest 0.0.3 documentation + deepforest.tfrecords — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
@@ -166,12 +166,15 @@

Source code for deepforest.tfrecords

 """
 import tensorflow as tf
 import os
+import csv
 import numpy as np
+
 from math import ceil
 import keras 
 import cv2
 import pandas as pd
 
+
 from keras_retinanet.preprocessing.csv_generator import CSVGenerator
 from keras_retinanet import models
 from keras_retinanet.models.retinanet import retinanet_bbox
@@ -222,6 +225,7 @@ 

Source code for deepforest.tfrecords

     #filebase name
     image_basename = os.path.splitext(os.path.basename(annotations_file))[0]
     
+    ## Syntax checks
     #Check annotations file only JPEG, PNG, GIF, or BMP are allowed.
     df = pd.read_csv(annotations_file, names=["image_path","xmin","ymin","xmax","ymax","label"])
     df['FileType'] = df.image_path.str.split('.').str[-1].str.lower()
@@ -230,6 +234,13 @@ 

Source code for deepforest.tfrecords

     if bad_file_types > 0:
         raise ValueError("Check annotations file, only JPEG, PNG, GIF, or BMP are allowed, {} incorrect files found".format(bad_file_types))
     
+    #Check dtypes, cannot use pandas, or will coerce in the presence of NAs
+    with open(annotations_file, 'r') as f:
+        reader = csv.reader(f, delimiter=',')
+        row = next(reader)
+        if row[1].count(".") > 0:
+            raise ValueError("Annotation files should be headerless with integer box, {} is not a int".format(row[1]))
+            
     #Create generator - because of how retinanet yields data, this should always be 1. Shape problems in the future?
     train_generator = CSVGenerator(
         annotations_file,
diff --git a/docs/_build/html/_modules/deepforest/utilities.html b/docs/_build/html/_modules/deepforest/utilities.html
index b5fb2aa8..23cf8a2d 100644
--- a/docs/_build/html/_modules/deepforest/utilities.html
+++ b/docs/_build/html/_modules/deepforest/utilities.html
@@ -8,7 +8,7 @@
   
   
   
-  deepforest.utilities — DeepForest 0.0.3 documentation
+  deepforest.utilities — DeepForest 0.1.0 documentation
   
 
   
@@ -59,7 +59,7 @@
             
             
               
- 0.0.3 + 0.1.0
@@ -199,14 +199,15 @@

Source code for deepforest.utilities

                         self.total = tsize
                 self.update(b * bsize - self.n)
-
[docs]def use_release(save_dir = "data"): +
[docs]def use_release(save_dir = "data", prebuilt_model="NEON"): '''Check the existance of, or download the latest model release from github Args: save_dir (str): Directory to save filepath, default to "data" in toplevel repo + prebuilt_model: Currently only accepts "NEON", but could be expanded to include other prebuilt models. The local model will be called {prebuilt_model}.h5 on disk. Returns: - output_path (str): path to downloaded model + release_tag, output_path (str): path to downloaded model ''' #Find latest github tag release from the DeepLidar repo @@ -215,19 +216,22 @@

Source code for deepforest.utilities

             headers={'Accept': 'application/vnd.github.v3+json'},
              )).read())     
         asset = _json['assets'][0]
-        output_path = os.path.join(save_dir,asset['name'])    
         url = asset['browser_download_url']
         
+        #Naming based on pre-built model
+        output_path = os.path.join(save_dir,prebuilt_model + ".h5")    
+        
         #Download if it doesn't exist
         if not os.path.exists(output_path):
                 print("Downloading model from DeepForest release {}, see {} for details".format(_json["tag_name"],_json["html_url"]))                
                 with DownloadProgressBar(unit='B', unit_scale=True,
                                      miniters=1, desc=url.split('/')[-1]) as t:
                         urllib.request.urlretrieve(url, filename=output_path, reporthook=t.update_to)           
+                print("Model was downloaded and saved to {}".format(output_path))                
         else:
                 print("Model from DeepForest release {} was already downloaded. Loading model from file.".format(_json["html_url"]))
                 
-        return output_path
+ return _json["html_url"], output_path
[docs]def xml_to_annotations(xml_path, rgb_dir): """Load annotations from xml format (e.g. RectLabel editor) and convert them into retinanet annotations format. @@ -302,11 +306,11 @@

Source code for deepforest.utilities

         classes_path = os.path.join(dirname,"classes.csv")
         
         #get unique labels
-        labels = annotations.label.unique()
+        labels = annotations.label.dropna().unique()
         n_classes = labels.shape[0]
         print("There are {} unique labels: {} ".format(n_classes,list(labels))) 
-        if n_classes > 1:
-                raise ValueError("There are greater than 1 classes ({}), check annotation levels for file {}".format(list(labels), annotations_file))
+        #if n_classes > 1:
+        #        raise ValueError("There are greater than 1 classes ({}), check annotation levels for file {}".format(list(labels), annotations_file))
         
         #write label
         with open(classes_path,'w') as csv_file:
diff --git a/docs/_build/html/_modules/index.html b/docs/_build/html/_modules/index.html
index 15b38fec..669573cf 100644
--- a/docs/_build/html/_modules/index.html
+++ b/docs/_build/html/_modules/index.html
@@ -8,7 +8,7 @@
   
   
   
-  Overview: module code — DeepForest 0.0.3 documentation
+  Overview: module code — DeepForest 0.1.0 documentation
   
 
   
@@ -59,7 +59,7 @@
             
             
               
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_modules/tests/test_deepforest.html b/docs/_build/html/_modules/tests/test_deepforest.html index 41a7e463..7ce5d8e4 100644 --- a/docs/_build/html/_modules/tests/test_deepforest.html +++ b/docs/_build/html/_modules/tests/test_deepforest.html @@ -8,7 +8,7 @@ - tests.test_deepforest — DeepForest 0.0.3 documentation + tests.test_deepforest — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
@@ -198,27 +198,39 @@

Source code for tests.test_deepforest

     model = deepforest.deepforest(weights=None)
     assert model.weights is None
-
[docs]@pytest.fixture() -def test_use_release(download_release): +
[docs]def test_use_release(download_release): test_model = deepforest.deepforest() test_model.use_release() + + #Check for release tag + assert isinstance(test_model.__release_version__, str) + + #Assert is model instance + assert isinstance(test_model.model,keras.models.Model)
+ +
[docs]@pytest.fixture() +def release_model(download_release): + test_model = deepforest.deepforest() + test_model.use_release() + + #Check for release tag + assert isinstance(test_model.__release_version__, str) + #Assert is model instance assert isinstance(test_model.model,keras.models.Model) return test_model
[docs]def test_predict_image(download_release): - #Load model - test_model = deepforest.deepforest(weights="tests/data/universal_model_july30.h5") + test_model = deepforest.deepforest(weights="tests/data/NEON.h5") assert isinstance(test_model.model,keras.models.Model) #Predict test image and return boxes boxes = test_model.predict_image(image_path="tests/data/OSBS_029.tif", show=False, return_plot = False) - #Returns a 4 column numpy array - assert isinstance(boxes,np.ndarray) - assert boxes.shape[1] == 4
+ #Returns a 6 column numpy array, xmin, ymin, xmax, ymax, score, label + assert boxes.shape[1] == 6
[docs]@pytest.fixture() def test_train(annotations): @@ -230,7 +242,6 @@

Source code for tests.test_deepforest

     
     return test_model
-#Check that weights have changed, following https://medium.com/@keeper6928/how-to-unit-test-machine-learning-code-57cf6fd81765
[docs]def test_train_no_freeze(annotations, test_train): test_train.config["freeze_layers"] = 0 @@ -266,12 +277,12 @@

Source code for tests.test_deepforest

     #Because the network uses batch norm layers, there is a slight drift in weights. It should be very small.
     #assert np.array_equal(before, after)
 
-
[docs]def test_predict_generator(test_use_release, annotations): - boxes = test_use_release.predict_generator(annotations=annotations) - assert boxes.shape[1] == 5
+
[docs]def test_predict_generator(release_model, annotations): + boxes = release_model.predict_generator(annotations=annotations) + assert boxes.shape[1] == 7
-
[docs]def test_evaluate(test_use_release, annotations): - mAP = test_use_release.evaluate_generator(annotations=annotations) +
[docs]def test_evaluate(release_model, annotations): + mAP = release_model.evaluate_generator(annotations=annotations) #Assert that function returns a float numpy value assert mAP.dtype == float
@@ -291,20 +302,20 @@

Source code for tests.test_deepforest

     arg_list = utilities.format_args(annotations, test_model.config)
     assert "--random-transform" in arg_list
-
[docs]def test_predict_tile(test_use_release): +
[docs]def test_predict_tile(release_model): raster_path = "tests/data/OSBS_029.tif" original_raster = Image.open(raster_path) original_raster = np.array(original_raster) #This should make the same prediction? - #predicted_raster = test_use_release.predict_tile(raster_path, return_plot = False, patch_size=400,patch_overlap=0) - #predicted_image = test_use_release.predict_image(raster_path, return_plot = False) + #predicted_raster = release_model.predict_tile(raster_path, return_plot = False, patch_size=400,patch_overlap=0) + #predicted_image = release_model.predict_image(raster_path, return_plot = False) #assert predicted_raster.shape == predicted_image.shape #Debug - predicted_raster = test_use_release.predict_tile(raster_path, return_plot = True, patch_size=300,patch_overlap=0.5) - predicted_image = test_use_release.predict_image(raster_path, return_plot = True) + predicted_raster = release_model.predict_tile(raster_path, return_plot = True, patch_size=300,patch_overlap=0.5) + predicted_image = release_model.predict_image(raster_path, return_plot = True) assert original_raster.shape == predicted_raster.shape diff --git a/docs/_build/html/_modules/tests/test_preprocess.html b/docs/_build/html/_modules/tests/test_preprocess.html index c08c195c..48667727 100644 --- a/docs/_build/html/_modules/tests/test_preprocess.html +++ b/docs/_build/html/_modules/tests/test_preprocess.html @@ -8,7 +8,7 @@ - tests.test_preprocess — DeepForest 0.0.3 documentation + tests.test_preprocess — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_modules/tests/test_tfrecords.html b/docs/_build/html/_modules/tests/test_tfrecords.html index dae670b4..496c923e 100644 --- a/docs/_build/html/_modules/tests/test_tfrecords.html +++ b/docs/_build/html/_modules/tests/test_tfrecords.html @@ -8,7 +8,7 @@ - tests.test_tfrecords — DeepForest 0.0.3 documentation + tests.test_tfrecords — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_modules/tests/test_utilities.html b/docs/_build/html/_modules/tests/test_utilities.html index 2b64c46f..fb4ce38a 100644 --- a/docs/_build/html/_modules/tests/test_utilities.html +++ b/docs/_build/html/_modules/tests/test_utilities.html @@ -8,7 +8,7 @@ - tests.test_utilities — DeepForest 0.0.3 documentation + tests.test_utilities — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/_sources/getting_started.md.txt b/docs/_build/html/_sources/getting_started.md.txt index 27a29da3..9b89b71b 100644 --- a/docs/_build/html/_sources/getting_started.md.txt +++ b/docs/_build/html/_sources/getting_started.md.txt @@ -18,7 +18,7 @@ bioRxiv 790071; doi: https://doi.org/10.1101/790071 # Training -While the prebuilt models outperform available tree crown detection tools, they can always be improved by adding data from the target area. In our work, we have found that even one hour worth of carefully chosen hand annotation can yield enormous improvements in accuracy and precision. We envision that for the majority of scientific applications, atleast some finetuning of the prebuilt model will be worthwhile. +The prebuilt models can always be improved by adding data from the target area. In our work, we have found that even one hour worth of carefully chosen hand annotation can yield enormous improvements in accuracy and precision. We envision that for the majority of scientific applications, atleast some finetuning of the prebuilt model will be worthwhile. ```{python} @@ -26,14 +26,22 @@ While the prebuilt models outperform available tree crown detection tools, they ``` -## Training Hardware +# Evaluation -Training neural networks is computationally intensive. While small amounts of data, on the order of several hundred trees, can be trained on a laptop in a few hours, large amounts of data are best trained on dedicated graphical processing units (GPUs). Many university clusters have GPUs available, and they can be rented for short periods of time on cloud servers (AWS, Google Cloud, Azure). +Independent analysis of whether a model can generalize from training data to new areas is critical for creating a robust model. We stress that evaluation data must be different from training data, as neural networks have millions of parameters and can easily memorize thousands of samples. Therefore, while it would be rather easy to tune the model to get extremely high scores on the training data, it would fail when exposed to new images. -For more details and recommendations for model training see [training overview](). +DeepForest uses the keras-retinanet ```evaluate``` method to score images. This consists of an annotations.csv file in the following format -# Evaluation +``` +image_path, xmin, ymin, xmax, ymax, label +``` + +```{python} + + +``` +For more on evaluation, see the [Evaluation Overview]() ## NEON Benchmark diff --git a/docs/_build/html/_sources/training.md.txt b/docs/_build/html/_sources/training.md.txt index b5f74074..9320e30b 100644 --- a/docs/_build/html/_sources/training.md.txt +++ b/docs/_build/html/_sources/training.md.txt @@ -22,5 +22,8 @@ Rectlabel screenshot xml format explanation +## Training Hardware -### Guidelines for model Training +Training neural networks is computationally intensive. While small amounts of data, on the order of several hundred trees, can be trained on a laptop in a few hours, large amounts of data are best trained on dedicated graphical processing units (GPUs). Many university clusters have GPUs available, and they can be rented for short periods of time on cloud servers (AWS, Google Cloud, Azure). + +For more details and recommendations for model training see [training overview](). diff --git a/docs/_build/html/_static/documentation_options.js b/docs/_build/html/_static/documentation_options.js index 99cd9e6a..23bb16ed 100644 --- a/docs/_build/html/_static/documentation_options.js +++ b/docs/_build/html/_static/documentation_options.js @@ -1,6 +1,6 @@ var DOCUMENTATION_OPTIONS = { URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), - VERSION: '0.0.3', + VERSION: '0.1.0', LANGUAGE: 'None', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', diff --git a/docs/_build/html/authors.html b/docs/_build/html/authors.html index d0818ae1..7f411595 100644 --- a/docs/_build/html/authors.html +++ b/docs/_build/html/authors.html @@ -8,7 +8,7 @@ - <no title> — DeepForest 0.0.3 documentation + <no title> — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
- 0.0.3 + 0.1.0
diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index c3b80ff6..dfb342f7 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -9,7 +9,7 @@ - Index — DeepForest 0.0.3 documentation + Index — DeepForest 0.1.0 documentation @@ -60,7 +60,7 @@
- 0.0.3 + 0.1.0
@@ -330,10 +330,12 @@

M

N

@@ -343,8 +345,6 @@

P

diff --git a/docs/_build/html/getting_started.html b/docs/_build/html/getting_started.html index 184352ea..48976459 100644 --- a/docs/_build/html/getting_started.html +++ b/docs/_build/html/getting_started.html @@ -8,7 +8,7 @@ - What is DeepForest? — DeepForest 0.0.3 documentation + What is DeepForest? — DeepForest 0.1.0 documentation @@ -61,7 +61,7 @@
- 0.0.3 + 0.1.0
@@ -90,10 +90,7 @@
  • What is DeepForest?
  • How does it work?
  • Prebuilt models
  • -
  • Training -
  • +
  • Training
  • Evaluation @@ -185,19 +182,23 @@

    Prebuilt models

    Training

    -

    While the prebuilt models outperform available tree crown detection tools, they can always be improved by adding data from the target area. In our work, we have found that even one hour worth of carefully chosen hand annotation can yield enormous improvements in accuracy and precision. We envision that for the majority of scientific applications, atleast some finetuning of the prebuilt model will be worthwhile.

    +

    The prebuilt models can always be improved by adding data from the target area. In our work, we have found that even one hour worth of carefully chosen hand annotation can yield enormous improvements in accuracy and precision. We envision that for the majority of scientific applications, atleast some finetuning of the prebuilt model will be worthwhile.

    
     
     
    -
    -

    Training Hardware

    -

    Training neural networks is computationally intensive. While small amounts of data, on the order of several hundred trees, can be trained on a laptop in a few hours, large amounts of data are best trained on dedicated graphical processing units (GPUs). Many university clusters have GPUs available, and they can be rented for short periods of time on cloud servers (AWS, Google Cloud, Azure).

    -

    For more details and recommendations for model training see training overview.

    -

  • Evaluation

    +

    Independent analysis of whether a model can generalize from training data to new areas is critical for creating a robust model. We stress that evaluation data must be different from training data, as neural networks have millions of parameters and can easily memorize thousands of samples. Therefore, while it would be rather easy to tune the model to get extremely high scores on the training data, it would fail when exposed to new images.

    +

    DeepForest uses the keras-retinanet evaluate method to score images. This consists of an annotations.csv file in the following format

    +
    image_path, xmin, ymin, xmax, ymax, label
    +
    +
    +
    
    +
    +
    +

    For more on evaluation, see the Evaluation Overview

    NEON Benchmark

    To standardize model evaluation, we have collected and published a benchmark dataset of nearly 20,000 crowns from sites in the National Ecological Observation Network.

    diff --git a/docs/_build/html/history.html b/docs/_build/html/history.html index 1360097c..0e5304b9 100644 --- a/docs/_build/html/history.html +++ b/docs/_build/html/history.html @@ -8,7 +8,7 @@ - <no title> — DeepForest 0.0.3 documentation + <no title> — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
    - 0.0.3 + 0.1.0
    diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index ef1d52e8..64342248 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -8,7 +8,7 @@ - Welcome to DeepForest’s documentation! — DeepForest 0.0.3 documentation + Welcome to DeepForest’s documentation! — DeepForest 0.1.0 documentation @@ -60,7 +60,7 @@
    - 0.0.3 + 0.1.0
    @@ -169,10 +169,7 @@

    Welcome to DeepForest’s documentation!What is DeepForest?
  • How does it work?
  • Prebuilt models
  • -
  • Training -
  • +
  • Training
  • Evaluation @@ -186,6 +183,7 @@

    Welcome to DeepForest’s documentation!Training new models - An Overview

  • deepforest package
      diff --git a/docs/_build/html/installation.html b/docs/_build/html/installation.html index 12497a4f..38dc1c8e 100644 --- a/docs/_build/html/installation.html +++ b/docs/_build/html/installation.html @@ -8,7 +8,7 @@ - Installation — DeepForest 0.0.3 documentation + Installation — DeepForest 0.1.0 documentation @@ -61,7 +61,7 @@
      - 0.0.3 + 0.1.0
      diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 9dc86ee2..08c82819 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/py-modindex.html b/docs/_build/html/py-modindex.html index 9f5c1147..2483cc76 100644 --- a/docs/_build/html/py-modindex.html +++ b/docs/_build/html/py-modindex.html @@ -8,7 +8,7 @@ - Python Module Index — DeepForest 0.0.3 documentation + Python Module Index — DeepForest 0.1.0 documentation @@ -62,7 +62,7 @@
      - 0.0.3 + 0.1.0
      diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 88d3fcad..2a5cad6a 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -8,7 +8,7 @@ - Search — DeepForest 0.0.3 documentation + Search — DeepForest 0.1.0 documentation @@ -60,7 +60,7 @@
      - 0.0.3 + 0.1.0
      diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index cef646d9..4b3a7984 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["authors","getting_started","history","index","installation","source/deepforest","source/modules","source/setup","source/tests","training"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["authors.rst","getting_started.md","history.rst","index.rst","installation.md","source/deepforest.rst","source/modules.rst","source/setup.rst","source/tests.rst","training.md"],objects:{"":{deepforest:[5,0,0,"-"],tests:[8,0,0,"-"]},"deepforest.cli":{main:[5,1,1,""]},"deepforest.deepforest":{deepforest:[5,2,1,""]},"deepforest.deepforest.deepforest":{evaluate_generator:[5,3,1,""],model:[5,4,1,""],predict_generator:[5,3,1,""],predict_image:[5,3,1,""],predict_tile:[5,3,1,""],train:[5,3,1,""],use_release:[5,3,1,""]},"deepforest.predict":{label_to_name:[5,1,1,""],predict_all_images:[5,1,1,""],predict_image:[5,1,1,""],prediction_wrapper:[5,1,1,""]},"deepforest.preprocess":{compute_windows:[5,1,1,""],image_name_from_path:[5,1,1,""],save_crop:[5,1,1,""],select_annotations:[5,1,1,""],split_raster:[5,1,1,""]},"deepforest.retinanet_train":{check_args:[5,1,1,""],create_callbacks:[5,1,1,""],create_generators:[5,1,1,""],create_models:[5,1,1,""],main:[5,1,1,""],makedirs:[5,1,1,""],model_with_weights:[5,1,1,""],parse_args:[5,1,1,""]},"deepforest.tfrecords":{create_dataset:[5,1,1,""],create_tensors:[5,1,1,""],create_tf_example:[5,1,1,""],create_tfrecords:[5,1,1,""],model_with_weights:[5,1,1,""]},"deepforest.utilities":{DownloadProgressBar:[5,2,1,""],create_classes:[5,1,1,""],format_args:[5,1,1,""],label_to_name:[5,1,1,""],number_of_images:[5,1,1,""],read_config:[5,1,1,""],read_model:[5,1,1,""],use_release:[5,1,1,""],xml_to_annotations:[5,1,1,""]},"deepforest.utilities.DownloadProgressBar":{update_to:[5,3,1,""]},"tests.test_deepforest":{annotations:[8,1,1,""],download_release:[8,1,1,""],prepare_tfdataset:[8,1,1,""],test_deepforest:[8,1,1,""],test_evaluate:[8,1,1,""],test_freeze_train:[8,1,1,""],test_predict_generator:[8,1,1,""],test_predict_image:[8,1,1,""],test_predict_tile:[8,1,1,""],test_random_transform:[8,1,1,""],test_tfrecord_train:[8,1,1,""],test_train:[8,1,1,""],test_train_no_freeze:[8,1,1,""],test_use_release:[8,1,1,""]},"tests.test_preprocess":{config:[8,1,1,""],numpy_image:[8,1,1,""],test_compute_windows:[8,1,1,""],test_select_annotations:[8,1,1,""],test_select_annotations_tile:[8,1,1,""],test_split_raster:[8,1,1,""]},"tests.test_tfrecords":{bad_annotations:[8,1,1,""],config:[8,1,1,""],setup_create_tensors:[8,1,1,""],test_create_dataset:[8,1,1,""],test_create_tensors:[8,1,1,""],test_create_tfrecords:[8,1,1,""],test_equivalence:[8,1,1,""],test_tfdataset_error:[8,1,1,""]},"tests.test_utilities":{annotations:[8,1,1,""],config:[8,1,1,""],test_create_classes:[8,1,1,""],test_format_args:[8,1,1,""],test_format_args_steps:[8,1,1,""],test_number_of_images:[8,1,1,""],test_xml_to_annotations:[8,1,1,""]},deepforest:{cli:[5,0,0,"-"],deepforest:[5,0,0,"-"],predict:[5,0,0,"-"],preprocess:[5,0,0,"-"],retinanet_train:[5,0,0,"-"],tfrecords:[5,0,0,"-"],utilities:[5,0,0,"-"]},tests:{test_deepforest:[8,0,0,"-"],test_preprocess:[8,0,0,"-"],test_tfrecords:[8,0,0,"-"],test_utilities:[8,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"100x":5,"case":9,"class":5,"default":5,"final":5,"float":5,"function":[1,5],"int":5,"new":[1,3,5],"return":[1,5],"short":1,"true":5,"try":9,"while":1,AWS:1,For:[1,5],NMS:5,The:[1,4,5],There:[1,5],Use:5,Useful:5,Using:1,accept:5,accuraci:[1,9],across:5,adding:1,airborn:1,algorithm:1,alina:1,all:5,allow:1,also:5,alwai:[1,9],among:[4,5],amount:[1,9],annot:[1,3,5,8],annotations_fil:5,anoth:9,answer:9,appli:5,applic:1,approach:1,area:1,arg:5,arg_list:5,argpars:5,argument:5,arrai:5,ascii:5,assert:5,atleast:1,avail:[1,3,9],averag:5,azur:1,backbon:5,backbone_model:5,backbone_nam:5,backbone_retinanet:5,backend:5,bad_annot:8,bar_format:5,base:5,base_dir:5,batch:5,batch_siz:5,bbox:5,been:1,befor:9,ben:1,benchmark:3,best:[1,9],bgr:5,billinear:5,biorxiv:1,bohlman:1,bool:5,bottom:5,bound:[1,5],box:[1,5],boxes_output:5,broad:9,bsize:5,built:1,call:5,callback:5,can:[1,4,5,9],cannot:1,captur:9,carefulli:1,channel:5,check:5,check_arg:5,chosen:1,class_fil:5,class_nam:5,class_target:5,clear:9,cli:[3,6],clone:4,cloud:1,cluster:1,code:3,collect:1,column:5,com:[1,3,4,5],comet:5,comet_experi:5,cometml:5,common:9,commonli:9,compromis:5,computation:1,compute_window:5,conda:3,config:[5,8],configur:5,confus:8,consist:5,consol:5,contain:5,content:[3,6],contradict:5,conveni:1,convent:5,convert:5,copi:5,correspond:1,count:5,creat:5,create_callback:5,create_class:5,create_dataset:5,create_gener:5,create_model:5,create_tensor:5,create_tf_exampl:5,create_tfrecord:5,creation:5,critic:9,crop:5,crown:[1,3,5],csv:5,current:5,cut:5,cv2:8,data:[1,3,5],datafram:5,dataset:[1,5,9],debug:5,dedic:1,deep:[1,5],deepforest:[4,8,9],defin:9,depend:3,deriv:5,desc:5,design:[1,3],desir:9,detail:1,detect:[1,4,5],develop:9,dict:5,dictionari:5,differ:5,dimens:5,dir:5,directli:1,directori:5,disabl:5,disk:5,dive:9,divid:5,doe:3,doesn:5,doi:1,download:5,download_releas:8,downloadprogressbar:5,drawn:5,due:8,dure:5,dynamic_ncol:5,each:[1,5],ecolog:[1,9],editor:5,eek:9,either:5,elimin:5,els:5,enorm:[1,5],entri:5,environ:3,envis:1,epoch:5,error:5,ethan:1,evalu:[3,5],evaluate_gener:5,even:1,exampl:5,exist:5,experi:[5,9],explan:9,fact:8,fals:5,few:1,file:[1,5,9],filenam:5,filepath:5,finetun:[1,5],fit:1,fit_gener:5,fizyr:[4,5],flux:8,fname:5,follow:[1,5],form:5,format:[1,5,9],format_arg:5,found:1,freez:5,freeze_backbon:5,freeze_lay:5,from:[1,3,4,5,9],gather:3,gener:[1,5,9],geograph:[1,9],get:5,git:[3,4],github:[1,3,4,5,8],given:5,googl:1,gpu:[1,5],graphic:1,gui:5,hand:[1,9],hardwar:3,has:[1,9],have:[1,9],header:5,here:3,highli:9,hour:1,how:[3,5],http:[1,3,4,5,8],hundr:1,ident:[5,8],ignor:5,imag:[1,5],image_box:5,image_min_sid:5,image_nam:5,image_name_from_path:5,image_path:5,imageri:[1,3],images_per_epoch:5,improv:[1,5,9],includ:5,increas:9,index:[3,5],indic:5,individu:[1,3],inexpens:9,inher:5,initi:5,initialis:5,input:5,input_typ:5,instal:3,intend:5,intens:1,invidiu:5,iou:5,iou_threshold:5,iter:5,jpg:5,jricheim:8,just:[5,9],kera:[1,4,5],kind:9,kwarg:5,label:5,label_to_nam:5,laptop:1,larg:[1,5],latest:5,layer:5,learn:[1,5,9],leav:5,level:5,list:5,list_of_tfrecord:5,load:5,locat:9,log:5,lookup:5,loop:5,mac:9,made:5,mai:4,main:5,major:[1,9],make:[1,9],makedir:5,manag:4,mani:[1,5],manual:5,map:5,marconi:1,margin:5,match:[5,9],max_detect:5,maximum:5,maxinterv:5,mdpi:1,mean:5,memori:1,method:[5,8],mimic:5,minimum:5,mininterv:5,minit:5,mistak:9,model:[3,5],model_path:5,model_with_weight:5,modifi:5,modul:[3,6],more:[1,9],multi:5,multi_gpu:5,name:5,nation:1,natur:[5,9],ncol:5,nearli:1,need:[4,9],neon:3,neontreeevalu:1,network:[1,5],neural:1,nms:5,none:5,note:[4,9],num_class:5,num_gpu:5,number:5,number_of_imag:5,numpi:5,numpy_imag:[5,8],object:[1,4,5],observ:1,onc:1,one:[1,9],onli:9,opencv:5,option:5,order:[1,5],org:1,origin:5,original_imag:5,otherwis:5,our:[1,9],out:9,outcom:9,outperform:1,output_path:5,overlaid:5,overlap:[1,5],overrid:5,overview:[1,3],packag:[1,3,4,6],page:3,panda:5,param:5,paramet:5,pars:5,parse_arg:5,parsearg:5,parsed_arg:5,parser:5,patch_overlap:5,patch_siz:5,path:5,path_to_rast:5,path_to_til:5,per:5,percent:5,perform:[1,4,5,9],period:1,pil:5,pip:4,pipelin:5,pleas:9,plot:5,point:5,posit:5,possibl:9,postfix:5,prebuilt:[3,9],precis:[1,5],predict:[3,6,9],predict_all_imag:5,predict_gener:5,predict_imag:5,predict_til:[1,5],prediction_model:5,prediction_wrapp:5,prepare_tfdataset:8,prepreprocess:5,preprocess:[3,6],preprocess_imag:5,present:9,prior:5,priorit:9,probabl:5,process:[1,5],produc:9,program:9,publish:1,python:[1,3,4],question:9,rais:5,rang:[5,9],raster:5,raster_path:5,rasterio:5,raw_imag:5,read:[1,5],read_config:5,read_model:5,reader:5,reassambl:5,reassembl:1,recal:9,recommend:1,record:5,rectlabel:[5,9],refin:9,regardless:9,regress:5,regression_target:5,rel:5,releas:5,remot:1,rent:1,repo:5,repositori:4,represent:9,reshap:5,resiz:[5,8],resnet50:5,resnet:5,resourc:9,result:[1,5],retinainet:5,retinanet:[1,4,5],retinanet_train:[3,6],return_plot:5,rgb:[1,3,5],rgb_dir:5,run:5,same:5,satisfactori:1,save:5,save_crop:5,save_dir:5,save_weight:5,saved_model:5,savedir:5,scientif:1,score:5,score_threshold:5,scratch:5,screenshot:9,script:5,search:3,see:[1,5],select:5,select_annot:5,selected_annot:5,semi:1,sen:1,sens:9,seper:4,sergio:1,server:1,set:[5,9],setup:6,setup_create_tensor:8,sever:1,shape:5,should:5,show:5,shown:9,shuffl:5,simpler:1,singl:[1,5],site:1,size:5,skip:5,skip_mismatch:5,slide:5,small:1,smaller:5,smooth:5,smoothli:9,snapshot:5,some:1,sourc:[3,4,5,8],spend:9,split:1,split_rast:5,squar:5,standard:1,start:9,std:5,step:5,stephani:1,str:5,structur:5,submodul:[3,6],suggest:9,suitabl:5,supervis:1,system:4,take:5,target:[1,5],taxonomi:9,tensor:5,tensorflow:[4,5,8],test:6,test_compute_window:8,test_create_class:8,test_create_dataset:8,test_create_tensor:8,test_create_tfrecord:8,test_deepforest:6,test_equival:8,test_evalu:8,test_format_arg:8,test_format_args_step:8,test_freeze_train:8,test_number_of_imag:8,test_predict_gener:8,test_predict_imag:8,test_predict_til:8,test_preprocess:6,test_random_transform:8,test_select_annot:8,test_select_annotations_til:8,test_split_rast:8,test_tfdataset_error:8,test_tfrecord:6,test_tfrecord_train:8,test_train:8,test_train_no_freez:8,test_use_releas:8,test_util:6,test_xml_to_annot:8,tfdataset:5,tfrecord:[3,6],thei:[1,5],them:5,thi:[5,8,9],three:[1,5],threshold:[5,9],through:5,tile:[1,5],time:[1,9],too:5,tool:1,top:[1,5],toplevel:5,total:5,tqdm:5,track:5,tradeoff:5,train:[3,5],trainabl:5,training_model:5,tree:[1,3,5,9],tremend:9,tsize:5,turn:5,type:5,under:5,understand:9,unit:[1,5,8],unit_divisor:5,unit_scal:5,univers:1,unsupervis:1,update_to:5,use:5,use_releas:5,used:[5,9],useful:9,user:9,uses:[1,9],using:[1,4,5,9],util:[3,6],vagu:9,valid:5,validation_gener:5,valu:5,vari:4,variabl:9,wai:1,want:9,wast:9,weecolog:[1,3,4],weight:5,weinstein:1,were:5,what:[3,9],where:5,whether:[5,9],which:1,white:1,whose:5,wide:4,window:[1,5],wire:5,within:5,without:[5,9],work:[3,5,9],worth:1,worthwhil:1,would:5,wrap:5,write_byt:5,written:5,written_fil:5,www:1,xmax:5,xmin:5,xml:[5,9],xml_path:5,xml_to_annot:5,yield:1,ymax:5,ymin:5,yml:4,your:9,zare:1},titles:["<no title>","What is DeepForest?","<no title>","Welcome to DeepForest\u2019s documentation!","Installation","deepforest package","DeepForest","setup module","tests package","Training new models - An Overview"],titleterms:{"new":9,annot:9,benchmark:1,cli:5,conda:4,content:[5,8],data:9,deepforest:[1,3,5,6],depend:4,design:9,document:3,doe:1,environ:4,evalu:[1,9],gather:9,guidelin:9,hardwar:1,how:1,indic:3,instal:4,model:[1,9],modul:[5,7,8],neon:1,overview:9,packag:[5,8],prebuilt:1,predict:[1,5],preprocess:5,retinanet_train:5,setup:7,submodul:[5,8],tabl:3,test:8,test_deepforest:8,test_preprocess:8,test_tfrecord:8,test_util:8,tfrecord:5,train:[1,9],util:5,welcom:3,what:1,work:1}}) \ No newline at end of file +Search.setIndex({docnames:["authors","getting_started","history","index","installation","source/deepforest","source/modules","source/setup","source/tests","training"],envversion:{"sphinx.domains.c":1,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":1,"sphinx.domains.javascript":1,"sphinx.domains.math":2,"sphinx.domains.python":1,"sphinx.domains.rst":1,"sphinx.domains.std":1,"sphinx.ext.viewcode":1,sphinx:56},filenames:["authors.rst","getting_started.md","history.rst","index.rst","installation.md","source/deepforest.rst","source/modules.rst","source/setup.rst","source/tests.rst","training.md"],objects:{"":{deepforest:[5,0,0,"-"],tests:[8,0,0,"-"]},"deepforest.cli":{main:[5,1,1,""]},"deepforest.deepforest":{deepforest:[5,2,1,""]},"deepforest.deepforest.deepforest":{evaluate_generator:[5,3,1,""],model:[5,4,1,""],predict_generator:[5,3,1,""],predict_image:[5,3,1,""],predict_tile:[5,3,1,""],train:[5,3,1,""],use_release:[5,3,1,""]},"deepforest.predict":{label_to_name:[5,1,1,""],non_max_suppression:[5,1,1,""],predict_image:[5,1,1,""]},"deepforest.preprocess":{compute_windows:[5,1,1,""],image_name_from_path:[5,1,1,""],save_crop:[5,1,1,""],select_annotations:[5,1,1,""],split_raster:[5,1,1,""]},"deepforest.retinanet_train":{check_args:[5,1,1,""],create_callbacks:[5,1,1,""],create_generators:[5,1,1,""],create_models:[5,1,1,""],main:[5,1,1,""],makedirs:[5,1,1,""],model_with_weights:[5,1,1,""],parse_args:[5,1,1,""]},"deepforest.tfrecords":{create_dataset:[5,1,1,""],create_tensors:[5,1,1,""],create_tf_example:[5,1,1,""],create_tfrecords:[5,1,1,""],model_with_weights:[5,1,1,""]},"deepforest.utilities":{DownloadProgressBar:[5,2,1,""],create_classes:[5,1,1,""],format_args:[5,1,1,""],label_to_name:[5,1,1,""],number_of_images:[5,1,1,""],read_config:[5,1,1,""],read_model:[5,1,1,""],use_release:[5,1,1,""],xml_to_annotations:[5,1,1,""]},"deepforest.utilities.DownloadProgressBar":{update_to:[5,3,1,""]},"tests.test_deepforest":{annotations:[8,1,1,""],download_release:[8,1,1,""],prepare_tfdataset:[8,1,1,""],release_model:[8,1,1,""],test_deepforest:[8,1,1,""],test_evaluate:[8,1,1,""],test_freeze_train:[8,1,1,""],test_predict_generator:[8,1,1,""],test_predict_image:[8,1,1,""],test_predict_tile:[8,1,1,""],test_random_transform:[8,1,1,""],test_tfrecord_train:[8,1,1,""],test_train:[8,1,1,""],test_train_no_freeze:[8,1,1,""],test_use_release:[8,1,1,""]},"tests.test_preprocess":{config:[8,1,1,""],numpy_image:[8,1,1,""],test_compute_windows:[8,1,1,""],test_select_annotations:[8,1,1,""],test_select_annotations_tile:[8,1,1,""],test_split_raster:[8,1,1,""]},"tests.test_tfrecords":{bad_annotations:[8,1,1,""],config:[8,1,1,""],setup_create_tensors:[8,1,1,""],test_create_dataset:[8,1,1,""],test_create_tensors:[8,1,1,""],test_create_tfrecords:[8,1,1,""],test_equivalence:[8,1,1,""],test_tfdataset_error:[8,1,1,""]},"tests.test_utilities":{annotations:[8,1,1,""],config:[8,1,1,""],test_create_classes:[8,1,1,""],test_format_args:[8,1,1,""],test_format_args_steps:[8,1,1,""],test_number_of_images:[8,1,1,""],test_xml_to_annotations:[8,1,1,""]},deepforest:{cli:[5,0,0,"-"],deepforest:[5,0,0,"-"],predict:[5,0,0,"-"],preprocess:[5,0,0,"-"],retinanet_train:[5,0,0,"-"],tfrecords:[5,0,0,"-"],utilities:[5,0,0,"-"]},tests:{test_deepforest:[8,0,0,"-"],test_preprocess:[8,0,0,"-"],test_tfrecords:[8,0,0,"-"],test_utilities:[8,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","function","Python function"],"2":["py","class","Python class"],"3":["py","method","Python method"],"4":["py","attribute","Python attribute"]},objtypes:{"0":"py:module","1":"py:function","2":"py:class","3":"py:method","4":"py:attribute"},terms:{"100x":5,"case":9,"class":5,"default":5,"final":5,"float":5,"function":[1,5],"int":5,"new":[1,3,5],"return":[1,5],"short":9,"true":5,"try":9,"while":[1,9],AWS:9,For:[1,5,9],NMS:5,The:[1,4,5],There:[1,5],Use:5,Useful:5,Using:1,accept:5,accuraci:[1,9],across:5,adding:1,airborn:1,algorithm:1,alina:1,allow:1,also:5,alwai:[1,9],among:[4,5],amount:9,analysi:1,annot:[1,3,5,8],annotations_fil:5,anoth:9,answer:9,appli:5,applic:1,approach:1,area:1,arg:5,arg_list:5,argpars:5,argument:5,arrai:5,ascii:5,assert:5,atleast:1,avail:[3,9],averag:5,azur:9,backbon:5,backbone_model:5,backbone_nam:5,backbone_retinanet:5,backend:5,bad_annot:8,bar_format:5,base:5,base_dir:5,batch:5,batch_siz:5,bbox:5,been:1,befor:9,ben:1,benchmark:3,best:9,bgr:5,billinear:5,biorxiv:1,bohlman:1,bool:5,bottom:5,bound:[1,5],box:[1,5],boxes_output:5,broad:9,bsize:5,built:1,call:5,callback:5,can:[1,4,5,9],cannot:1,captur:9,carefulli:1,channel:5,check:5,check_arg:5,chosen:1,class_fil:5,class_nam:5,class_target:5,clear:9,cli:[3,6],clone:4,cloud:9,cluster:9,code:3,collect:1,column:5,com:[1,3,4,5],comet:5,comet_experi:5,cometml:5,common:9,commonli:9,compromis:5,computation:9,compute_window:5,conda:3,config:[5,8],configur:5,confus:8,consist:[1,5],consol:5,contain:5,content:[3,6],contradict:5,conveni:1,convent:5,convert:5,copi:5,correspond:1,could:5,count:5,creat:[1,5],create_callback:5,create_class:5,create_dataset:5,create_gener:5,create_model:5,create_tensor:5,create_tf_exampl:5,create_tfrecord:5,creation:5,critic:[1,9],crop:5,crown:[1,3,5],csv:[1,5],current:5,cut:5,cv2:8,data:[1,3,5],datafram:5,dataset:[1,5,9],debug:5,dedic:9,deep:[1,5],deepforest:[4,8,9],defin:9,depend:3,deriv:5,desc:5,design:[1,3],desir:9,detail:[1,9],detect:[1,4,5],develop:9,dict:5,dictionari:5,differ:[1,5],dimens:5,dir:5,directli:1,directori:5,disabl:5,disk:5,dive:9,divid:5,doe:3,doesn:5,doi:1,download:5,download_releas:8,downloadprogressbar:5,drawn:5,due:8,dure:5,dynamic_ncol:5,each:[1,5],easi:1,easili:1,ecolog:[1,9],editor:5,eek:9,either:5,elimin:5,els:5,enorm:[1,5],entri:5,environ:3,envis:1,epoch:5,error:5,ethan:1,evalu:[3,5],evaluate_gener:5,even:1,exampl:5,exist:5,expand:5,experi:[5,9],explan:9,expos:1,extrem:1,fact:8,fail:1,fals:5,few:9,file:[1,5,9],filenam:5,filepath:5,finetun:[1,5],fit:1,fit_gener:5,fizyr:[4,5],flux:8,fname:5,follow:[1,5],form:5,format:[1,5,9],format_arg:5,found:1,freez:5,freeze_backbon:5,freeze_lay:5,from:[1,3,4,5,9],gather:3,gener:[1,5,9],geograph:[1,9],get:[1,5],git:[3,4],github:[1,3,4,5,8],given:5,googl:9,gpu:[5,9],graphic:9,gui:5,hand:[1,9],hardwar:3,has:[1,9],have:[1,9],header:5,here:3,high:1,highli:9,hour:[1,9],how:[3,5],http:[1,3,4,5,8],hundr:9,ident:[5,8],ignor:5,imag:[1,5],image_box:5,image_class:5,image_detect:5,image_label:5,image_min_sid:5,image_nam:5,image_name_from_path:5,image_path:[1,5],image_scor:5,imageri:[1,3],images_per_epoch:5,improv:[1,5,9],includ:5,increas:9,independ:1,index:[3,5],indic:5,individu:[1,3],inexpens:9,inher:5,initi:5,initialis:5,input:5,input_typ:5,instal:3,intend:5,intens:9,invidiu:5,iou:5,iou_threshold:5,iter:5,jpg:5,jricheim:8,just:[5,9],kera:[1,4,5],kind:9,kwarg:5,label:[1,5],label_to_nam:5,laptop:9,larg:[1,5,9],latest:5,layer:5,learn:[1,5,9],leav:5,level:5,list:5,list_of_tfrecord:5,load:5,local:5,locat:9,log:5,lookup:5,loop:5,mac:9,made:5,mai:4,main:5,major:[1,9],make:[1,9],makedir:5,manag:4,mani:[5,9],manual:5,map:5,marconi:1,margin:5,match:[5,9],max_detect:5,max_output_s:5,maximum:5,maxinterv:5,mdpi:1,mean:5,memor:1,memori:1,method:[1,5,8],million:1,mimic:5,minimum:5,mininterv:5,minit:5,mistak:9,model:[3,5],model_path:5,model_with_weight:5,modifi:5,modul:[3,6],more:[1,9],multi:5,multi_gpu:5,must:1,name:5,nation:1,natur:[5,9],ncol:5,nearli:1,need:[4,9],neon:[3,5],neontreeevalu:1,network:[1,5,9],neural:[1,9],nms:5,non:5,non_max_suppress:5,none:5,note:[4,9],num_class:5,num_gpu:5,number:5,number_of_imag:5,numpi:5,numpy_imag:[5,8],object:[1,4,5],observ:1,onc:1,one:[1,9],onli:[5,9],opencv:5,option:5,order:[5,9],org:1,origin:5,original_imag:5,other:5,otherwis:5,our:[1,9],out:9,outcom:9,output_path:5,overlaid:5,overlap:[1,5],overrid:5,overview:[1,3],packag:[1,3,4,6],page:3,panda:5,param:5,paramet:[1,5],pars:5,parse_arg:5,parsearg:5,parsed_arg:5,parser:5,pass:5,patch_overlap:5,patch_siz:5,path:5,path_to_rast:5,path_to_til:5,per:5,percent:5,perform:[1,4,5,9],period:9,pil:5,pip:4,pipelin:5,pleas:9,plot:5,point:5,posit:5,possibl:9,postfix:5,prebuilt:[3,5,9],prebuilt_model:5,precis:[1,5],predict:[3,6,9],predict_gener:5,predict_imag:5,predict_til:[1,5],prediction_model:5,prepare_tfdataset:8,prepreprocess:5,preprocess:[3,6],preprocess_imag:5,present:9,prior:5,priorit:9,probabl:5,process:[5,9],produc:9,program:9,provid:5,publish:1,python:[1,3,4],question:9,rais:5,rang:[5,9],raster:5,raster_path:5,rasterio:5,rather:1,raw_imag:5,read:[1,5],read_config:5,read_model:5,reader:5,reassambl:5,reassembl:1,recal:9,recommend:9,record:5,rectlabel:[5,9],refin:9,regardless:9,regress:5,regression_target:5,rel:5,releas:5,release_model:8,release_tag:5,remot:1,rent:9,repo:5,repositori:4,represent:9,reshap:5,resiz:[5,8],resnet50:5,resnet:5,resourc:9,result:[1,5],retinainet:5,retinanet:[1,4,5],retinanet_train:[3,6],return_plot:5,rgb:[1,3,5],rgb_dir:5,robust:1,same:5,sampl:1,satisfactori:1,save:5,save_crop:5,save_dir:5,save_weight:5,saved_model:5,savedir:5,scientif:1,score:[1,5],score_threshold:5,scratch:5,screenshot:9,script:5,search:3,see:[1,5,9],select:5,select_annot:5,selected_annot:5,semi:1,sen:1,sens:9,seper:4,sergio:1,server:9,sess:5,session:5,set:[5,9],setup:6,setup_create_tensor:8,sever:9,shape:5,should:5,show:5,shown:9,shuffl:5,simpler:1,singl:[1,5],site:1,size:5,skip:5,skip_mismatch:5,slide:5,small:9,smaller:5,smooth:5,smoothli:9,snapshot:5,some:1,sourc:[3,4,5,8],spend:9,split:1,split_rast:5,squar:5,standard:1,start:9,std:5,step:5,stephani:1,str:5,stress:1,structur:5,submodul:[3,6],suggest:9,suitabl:5,supervis:1,suppress:5,system:4,take:5,target:[1,5],taxonomi:9,tensor:5,tensorflo:5,tensorflow:[4,5,8],test:6,test_compute_window:8,test_create_class:8,test_create_dataset:8,test_create_tensor:8,test_create_tfrecord:8,test_deepforest:6,test_equival:8,test_evalu:8,test_format_arg:8,test_format_args_step:8,test_freeze_train:8,test_number_of_imag:8,test_predict_gener:8,test_predict_imag:8,test_predict_til:8,test_preprocess:6,test_random_transform:8,test_select_annot:8,test_select_annotations_til:8,test_split_rast:8,test_tfdataset_error:8,test_tfrecord:6,test_tfrecord_train:8,test_train:8,test_train_no_freez:8,test_use_releas:8,test_util:6,test_xml_to_annot:8,tfdataset:5,tfrecord:[3,6],thei:[5,9],them:5,therefor:1,thi:[1,5,8,9],thousand:1,three:[1,5],threshold:[5,9],tile:[1,5],time:9,too:5,top:[1,5],toplevel:5,total:5,tqdm:5,track:5,tradeoff:5,train:[3,5],trainabl:5,training_model:5,tree:[1,3,5,9],tremend:9,tsize:5,tune:1,turn:5,type:5,under:5,understand:9,unit:[5,8,9],unit_divisor:5,unit_scal:5,univers:9,unsupervis:1,update_to:5,use:5,use_releas:5,used:[5,9],useful:9,user:9,uses:[1,9],using:[1,4,5,9],util:[3,6],vagu:9,valid:5,validation_gener:5,valu:5,vari:4,variabl:9,wai:1,want:9,wast:9,weecolog:[1,3,4],weight:5,weinstein:1,were:5,what:[3,9],when:1,where:5,whether:[1,5,9],which:1,white:1,whose:5,wide:4,window:[1,5],wire:5,within:5,without:[5,9],work:[3,5,9],worth:1,worthwhil:1,would:[1,5],wrap:5,write_byt:5,written:5,written_fil:5,www:1,xmax:[1,5],xmin:[1,5],xml:[5,9],xml_path:5,xml_to_annot:5,yield:1,ymax:[1,5],ymin:[1,5],yml:4,your:9,zare:1},titles:["<no title>","What is DeepForest?","<no title>","Welcome to DeepForest\u2019s documentation!","Installation","deepforest package","DeepForest","setup module","tests package","Training new models - An Overview"],titleterms:{"new":9,annot:9,benchmark:1,cli:5,conda:4,content:[5,8],data:9,deepforest:[1,3,5,6],depend:4,design:9,document:3,doe:1,environ:4,evalu:[1,9],gather:9,hardwar:9,how:1,indic:3,instal:4,model:[1,9],modul:[5,7,8],neon:1,overview:9,packag:[5,8],prebuilt:1,predict:[1,5],preprocess:5,retinanet_train:5,setup:7,submodul:[5,8],tabl:3,test:8,test_deepforest:8,test_preprocess:8,test_tfrecord:8,test_util:8,tfrecord:5,train:[1,9],util:5,welcom:3,what:1,work:1}}) \ No newline at end of file diff --git a/docs/_build/html/source/deepforest.html b/docs/_build/html/source/deepforest.html index 54121479..ea519617 100644 --- a/docs/_build/html/source/deepforest.html +++ b/docs/_build/html/source/deepforest.html @@ -8,7 +8,7 @@ - deepforest package — DeepForest 0.0.3 documentation + deepforest package — DeepForest 0.1.0 documentation @@ -60,7 +60,7 @@
      - 0.0.3 + 0.1.0
      @@ -266,7 +266,7 @@

      SubmodulesReturns -

      if return_plot, an image. Otherwise a numpy array of predicted bounding boxes

      +

      if return_plot, an image. Otherwise a numpy array of predicted bounding boxes, with scores and labels

      Return type

      predictions (array)

      @@ -286,7 +286,7 @@

      SubmodulesReturns -

      if return_plot, an image. Otherwise a numpy array of predicted bounding boxes

      +

      if return_plot, an image. Otherwise a numpy array of predicted bounding boxes, scores and labels

      Return type

      boxes (array)

      @@ -342,26 +342,28 @@

      Submodules
      -deepforest.predict.label_to_name(label)[source]
      +deepforest.predict.label_to_name(image_classes, index)[source]

      Map label to name.

      -
      -deepforest.predict.predict_all_images()[source]
      -

      loop through a dir and run all images

      +
      +deepforest.predict.non_max_suppression(sess, boxes, scores, labels, max_output_size=200, iou_threshold=0.25)[source]
      +

      Provide a tensorflow session and get non-maximum suppression +:param sess: a tensorfloe

      +

      max_output_size, iou_threshold are passed to tf.image.non_max_suppression

      -deepforest.predict.predict_image(model, image_path=None, raw_image=None, score_threshold=0.05, max_detections=200, return_plot=True)[source]
      +deepforest.predict.predict_image(model, image_path=None, raw_image=None, score_threshold=0.05, max_detections=200, return_plot=True, classes=['Tree'])[source]

      Predict invidiual tree crown bounding boxes for a single image

      Parameters
      -

  • deepforest.preprocess module

    @@ -750,17 +747,20 @@

    Submodules
    -deepforest.utilities.use_release(save_dir='data')[source]
    +deepforest.utilities.use_release(save_dir='data', prebuilt_model='NEON')[source]

    Check the existance of, or download the latest model release from github

    Parameters
    -

    save_dir (str) – Directory to save filepath, default to “data” in toplevel repo

    +
      +
    • save_dir (str) – Directory to save filepath, default to “data” in toplevel repo

    • +
    • prebuilt_model – Currently only accepts “NEON”, but could be expanded to include other prebuilt models. The local model will be called {prebuilt_model}.h5 on disk.

    • +
    Returns

    path to downloaded model

    Return type
    -

    output_path (str)

    +

    release_tag, output_path (str)

    diff --git a/docs/_build/html/source/modules.html b/docs/_build/html/source/modules.html index e6ea2aa0..7036f298 100644 --- a/docs/_build/html/source/modules.html +++ b/docs/_build/html/source/modules.html @@ -8,7 +8,7 @@ - DeepForest — DeepForest 0.0.3 documentation + DeepForest — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
    - 0.0.3 + 0.1.0
    diff --git a/docs/_build/html/source/setup.html b/docs/_build/html/source/setup.html index 1ade50f4..afb76f6d 100644 --- a/docs/_build/html/source/setup.html +++ b/docs/_build/html/source/setup.html @@ -8,7 +8,7 @@ - setup module — DeepForest 0.0.3 documentation + setup module — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
    - 0.0.3 + 0.1.0
    diff --git a/docs/_build/html/source/tests.html b/docs/_build/html/source/tests.html index 3f5e7b5e..0738a8fc 100644 --- a/docs/_build/html/source/tests.html +++ b/docs/_build/html/source/tests.html @@ -8,7 +8,7 @@ - tests package — DeepForest 0.0.3 documentation + tests package — DeepForest 0.1.0 documentation @@ -59,7 +59,7 @@
    - 0.0.3 + 0.1.0
    @@ -181,6 +181,11 @@

    Submodulestests.test_deepforest.prepare_tfdataset(annotations)[source]
    +
    +
    +tests.test_deepforest.release_model(download_release)[source]
    +
    +
    tests.test_deepforest.test_deepforest()[source]
    @@ -188,7 +193,7 @@

    Submodules
    -tests.test_deepforest.test_evaluate(test_use_release, annotations)[source]
    +tests.test_deepforest.test_evaluate(release_model, annotations)[source]

    @@ -198,7 +203,7 @@

    Submodules
    -tests.test_deepforest.test_predict_generator(test_use_release, annotations)[source]
    +tests.test_deepforest.test_predict_generator(release_model, annotations)[source]

    @@ -208,7 +213,7 @@

    Submodules
    -tests.test_deepforest.test_predict_tile(test_use_release)[source]
    +tests.test_deepforest.test_predict_tile(release_model)[source]

    diff --git a/docs/_build/html/training.html b/docs/_build/html/training.html index 688fd003..c1e5ec5f 100644 --- a/docs/_build/html/training.html +++ b/docs/_build/html/training.html @@ -8,7 +8,7 @@ - Training new models - An Overview — DeepForest 0.0.3 documentation + Training new models - An Overview — DeepForest 0.1.0 documentation @@ -61,7 +61,7 @@
    - 0.0.3 + 0.1.0
    @@ -96,10 +96,8 @@
  • Installation
  • Training new models - An Overview
  • deepforest package
  • @@ -187,9 +185,11 @@

    Gather annotations -

    Guidelines for model Training

    +
    +

    Training Hardware

    +

    Training neural networks is computationally intensive. While small amounts of data, on the order of several hundred trees, can be trained on a laptop in a few hours, large amounts of data are best trained on dedicated graphical processing units (GPUs). Many university clusters have GPUs available, and they can be rented for short periods of time on cloud servers (AWS, Google Cloud, Azure).

    +

    For more details and recommendations for model training see training overview.

    diff --git a/tests/__pycache__/test_deepforest.cpython-36.pyc b/tests/__pycache__/test_deepforest.cpython-36.pyc index 9f328629..f3113b86 100644 Binary files a/tests/__pycache__/test_deepforest.cpython-36.pyc and b/tests/__pycache__/test_deepforest.cpython-36.pyc differ