How to use the deepforest.boxes function in deepforest

To help you get started, we’ve selected a few deepforest examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github weecology / DeepForest / tests / test_boxes.py View on Github external
def test_merge_boxes(df):
    box_list = boxes.box_from_df(df)
    #plot_box(box_list)
    
    #Create an example
    merge_boxes = [box_list[0]]
    tile_boxes = box_list[1:]
    
    merged_boxes = boxes.merge_boxes(tile_boxes,merge_boxes)
    #plot_box(merged_boxes)
    
    assert len(merged_boxes) == 2
github weecology / DeepForest / tests / test_boxes.py View on Github external
def test_make_box(df):
    row = df.iloc[1]
    bbox = boxes.make_box(row.xmin,row.ymin,row.xmax,row.ymax)
    assert isinstance(bbox,shapely.geometry.Polygon)