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
).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file interactivecrop-0.0.10.tar.gz
.
File metadata
- Download URL: interactivecrop-0.0.10.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cc35be60b178599823f378a1c18476411365cc0bff1d1811957913757c0aeaa |
|
MD5 | 5482ffee3937c7cd97d6d4fc8545292a |
|
BLAKE2b-256 | 17aa32ef4a22db8573193f8551a8500fb5f578019d77b489292edaad9324b3a4 |
File details
Details for the file interactivecrop-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: interactivecrop-0.0.10-py3-none-any.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fadded14b6a52295bef590e7cc3abc361a91829de02f1a450353781aa6c154a |
|
MD5 | 6ac98782a94613a24640530bd67d68c3 |
|
BLAKE2b-256 | 92e85437b16be8ad45891fb46c61a246104f0d1287929a8cb880551eb48b3207 |