diff --git a/Auto_Cropping_Image_Tutorial/Auto_Image_Cropping.ipynb b/Auto_Cropping_Image_Tutorial/Auto_Image_Cropping.ipynb index 473b7eb625c41f278c5c99019daf3060efd33980..a17135bc8072d12eadf4f3fb26540544174f3b1a 100644 --- a/Auto_Cropping_Image_Tutorial/Auto_Image_Cropping.ipynb +++ b/Auto_Cropping_Image_Tutorial/Auto_Image_Cropping.ipynb @@ -20,6 +20,15 @@ "# !pip install rembg" ] }, + { + "cell_type": "markdown", + "id": "9142d4fc-1e9c-4207-98fb-602fab721c97", + "metadata": {}, + "source": [ + "### 🛑 STOP\n", + "**Pause to restart your kernel!** We sometimes need to do this after installing new packages using pip. Otherwise, you might get a message saying the package doesn't exist, even though you just installed it." + ] + }, { "cell_type": "markdown", "id": "07423b0f", @@ -123,12 +132,14 @@ "id": "f88accb8", "metadata": {}, "source": [ - "To perform a simple crop of the image, the .crop() method can be used. It requires a tuple denoting the 4 coordinates of the crop-rectangle (left, upper, right, and lower). For this example, the coordinates are specified manually." + "To perform a simple crop of the image, the .crop() method can be used. It requires a tuple denoting the 4 coordinates of the crop-rectangle (left, upper, right, and lower). For this example, the coordinates are specified manually.\n", + "\n", + "**For some intuition on how to choose values for left, upper, right, lower** (how you might want to crop): each value is the number of pixels \"in\" *from the left and top*. So in the cell below, we move 2300 pixels from the left to crop on the left, 10 pixels down from the top to crop for \"upper.\" But! we start on the left to crop for 'right', moving 3000 pixels from the **left** to crop. We also start on the top to crop the bottom, moving 1300 pixels from the **top** to crop." ] }, { "cell_type": "code", - "execution_count": 121, + "execution_count": 21, "id": "37445d6f", "metadata": {}, "outputs": [ @@ -139,7 +150,7 @@ "<PIL.Image.Image image mode=RGB size=700x1290>" ] }, - "execution_count": 121, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -629,7 +640,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.9" + "version": "3.8.11" } }, "nbformat": 4,