Optimal peanut butter and banana sandwiches
Project description
nannernest
A small package for optimizing banana coverage on peanut butter and banana sandwiches.
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 nannenest
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 Maxmimum number of banana slices to consider
[default: 16]
--banana-pct FLOAT Percent of banana to cut up [default: 75]
--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]
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
Hashes for nannernest-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2612ef84e9a401a1f4d18aeae49178a75b0ae20baf0b084f6382870579a1fcb |
|
MD5 | d30647fcbf0b08cf69b2a8c296b95bb2 |
|
BLAKE2b-256 | 0f38eb32fc96d4a1d55154c01eb7f6a69bd88b0c76e967232c16729084b305f4 |