nannernest
A small package for optimizing banana coverage on peanut butter and banana sandwiches. See blog post for more info.
Installation
nannernest is generally pip installable. Due to some C dependencies with the nesting library that I use nest2D, along with an outstanding PR, I would recommend the following way to install everything:
First, make sure you have boost and cmake installed. If you are on Linux, then you may have cmake installed, and you can install boost with
sudo apt-get install libboost-all-dev
I'm on a Mac, and I installed cmake with conda and boost with brew:
conda install cmake
brew install boost
Next, pip install my fork of nest2D:
pip install git+https://github.com/EthanRosenthal/nest2D.git@download-dependencies
Finally, pip install nannernest
pip install nannernest
Usage
Take a top-down picture that contains your banana and at least one slice of bread. Pass the image in via command line:
$ nannernest my_image.jpg
CLI Details
$ nannernest --help
Usage: nannernest [OPTIONS] IMAGE_PATH
Arguments:
IMAGE_PATH Image file which contains bread and banana [required]
Options:
--num-slices INTEGER Total number of slices to cut the banana
into. This number defines the slice
thickness. [default: 22]
--mask-threshold FLOAT Threshold of segmentation mask. [default:
0.6]
--peel-scaler FLOAT Fraction of slice that is assumed to belong
to banana insides versus the peel.
[default: 0.8]
--ellipse-ratio FLOAT Assumed ratio of minor axis to major axis of
banana slice ellipses [default: 0.85]
--plot-segmentation / --no-plot-segmentation
Whether or not to plot the segmentation
masks [default: False]
--plot-slicing / --no-plot-slicing
Whether or not to plot the slicing circle
and skeleton [default: False]
--output TEXT Name of file to output [default:
perfect_sandwich.jpg]
Metadata
Release files for nannernest 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nannernest-0.1.4.tar.gz | 37.2 kB | Without provenance | Details for nannernest-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nannernest-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for nannernest-0.1.4-py3-none-any.whl |
Total release size: 76.8 kB
Release files / nannernest-0.1.4.tar.gz
| Download URL | nannernest-0.1.4.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7211101fe395075471ea888b4b5df44fbc97566001f23cde01b5b6f3537c8806
|
|
BLAKE2b-256 checksum How to use checksums |
bec283a3178e818ab9386dd9efe5af65d950658106fa112c8f550d996c68d50f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Darwin/17.7.0
|
Release files / nannernest-0.1.4-py3-none-any.whl
| Download URL | nannernest-0.1.4-py3-none-any.whl |
|---|---|
| Size | 39.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
74d61f583934ee27cf9cee0ad088e2b2756da89d49857175930e3d45d5547a9f
|
|
BLAKE2b-256 checksum How to use checksums |
1cbff5c56164a6d0d16712275bf5fd1c0dc7562f3803474618ca6eb7e19d4590
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.5 Darwin/17.7.0
|
Security for nannernest 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.