Skip to main content

An interactive image cropping tool for Jupyter Notebooks in Python

Project description

Jupyter Interactive Cropping Widget

An interactive widget to rapidly crop images in Jupyter notebooks.

Widget Documentation, Examples, and Use

This widget can be found on the PyPI repository here, and can be installed via pip install interactivecrop.

Build Instructions

Install Jupyter and enable ipywidgets

After cloning this repo, you can build the widget from source and use in a jupyter lab/notebook instance. Before this widget will work properly, you will need to install and enable jupyter widgets. To enable the widgets for Jupyter Lab using pip follow the below commands:

pip install jupyterlab #installs jupyter lab and gives access to jupyter lab CLI
pip install ipywidgets
jupyter nbextension enable --py widgetsnbextension
jupyter labextension install @jupyter-widgets/jupyterlab-manager

* Feel free to run this in your default python environment or a separate kernel; If using a separate kernel make sure it has been added to the available kernels via the ipykernels package

Installing requirements for this widget

Once Jupyter has been installed and enabled, check that all requirements have been downloaded by running pip install -r requirements.txt from this directory. Then, open up a jupyter lab instance by running jupyter lab, and once inside try the below example using the images in the sample_image directory:

from interactivecrop.interactivecrop import main as crop
from interactivecrop.samples import sample_images, sample_names

crop(sample_images,image_name_list = sample_names)

For further examples of cropper use, see the Examples.ipynb (make sure to run the jupyter lab startup command from the root directory when running Examples.ipynb).

interface

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for interactivecrop, version 0.0.10
Filename, size File type Python version Upload date Hashes
Filename, size interactivecrop-0.0.10-py3-none-any.whl (1.3 MB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size interactivecrop-0.0.10.tar.gz (1.3 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page