Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
bw4sz committed Feb 17, 2024
1 parent 5054b96 commit 5510f44
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/examples/Australia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@
}
],
"source": [
"from deepforest import main\n",
"from deepforest import utilities\n",
"from deepforest import visualize\n",
"from deepforest import main, utilities, visualize\n",
"import rasterio as rio\n",
"from matplotlib import pyplot as plt\n",
"import cv2\n",
Expand All @@ -129,14 +127,16 @@
"# Make into a 3 page, remove alpha channel, and make channels last\n",
"r = rio.open(\"/Users/benweinstein/Downloads/Plot13Ortho.tif\").read()\n",
"r = r[:3,:,:]\n",
"r = r.transpose(1,2,0)"
"r = r.transpose(1,2,0)\n",
"\n",
"#boxes = m.predict_tile(image=r, patch_size=700, patch_overlap=0.2, iou_threshold=0.5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Great, its starts to run, but wow that's going to take too long on CPU for me to write this post. On GPU this might only take 2mins, but with a CPU almost an hour according to progress bar. Kill that and let's come back to the full prediction set when we are happy."
"Its starts to run, but wow that's going to take too long on CPU for me to write this post. On GPU this might only take 2mins, but with a CPU almost an hour according to progress bar. Kill that and let's come back to the full prediction set when we are happy."
]
},
{
Expand Down Expand Up @@ -254,7 +254,7 @@
"gdf = utilities.boxes_to_shapefile(boxes, root_dir=\"/Users/benweinstein/Downloads\", flip_y_axis=True)\n",
"gdf.to_file(\"/Users/benweinstein/Downloads/Plot13Ortho_crop.shp\")\n",
"\n",
"plot = visualize.plot_predictions(image=r, df=gdf)\n",
"plot = visualize.plot_predictions(image=r, df=gdf, color=(0, 165, 255))\n",
"plt.imshow(plot)\n",
"plt.show()"
]
Expand Down

0 comments on commit 5510f44

Please sign in to comment.