For a more detailed description see: www.phenopype.org/gallery/projects/cichlid-teeth/
Multiple tooth case#
In this project we need to exclude the reference scale (exclude when drawing the mask with
include: false), and some slightly altered settigngs for
invert:true considers inverted values of the images, to make the dark background light and the bright teeth dark for the algorithm to work).
import phenopype as pp import os ## my root directory - modify as needed os.chdir(r"D:\science\packages\phenopype\phenopype-gallery_exec") ## my laptop has a small screen, so I use a smaller phenopype window pp._config.window_max_dim = 800
Make phenopype project#
Create a phenopype project (remember,
Project is used to both create new projects, and load existing ones). Different phenopype projects can be useful, e.g., to process different batches of images from field seasons, perspectives, etc,. It makes sense to create them side by side in a subfolder, which I call “phenopype”. Thus, my research projects often have the following directory structure (just my way of working - this is really totally up to you):
my-project data # processed data (e.g., tables) data_raw # raw data (images, videos, etc.) phenopype # phenopype projects phenopype_templates # phenopype .yaml config templates scripts # python, R, etc. [...] # manuscripts, figures, literature, etc.
proj = pp.Project(r"phenopype\cichlid-teeth-2", True)
## add tooth-images from the data folder and only include the images containing multiple teeth proj.add_files(image_dir = r"data_raw\cichlid-teeth", exclude=["depth", "Depth"], mode="link")
for path in proj.dir_paths: pp.Pype(path, tag="v1")
proj.collect_results(files=["canvas", "shape"], tag="v1", aggregate_csv=True, overwrite=True)