Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/etowahadams/leaf-colors
Analyzing leaf color of 10,950 iNaturalist observations of Red Maple (Acer rubrum)
https://github.com/etowahadams/leaf-colors
Last synced: about 2 months ago
JSON representation
Analyzing leaf color of 10,950 iNaturalist observations of Red Maple (Acer rubrum)
- Host: GitHub
- URL: https://github.com/etowahadams/leaf-colors
- Owner: etowahadams
- License: mit
- Created: 2019-12-29T01:32:48.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-12T19:01:58.000Z (almost 5 years ago)
- Last Synced: 2024-10-18T17:26:45.864Z (3 months ago)
- Language: Python
- Homepage:
- Size: 584 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Leaf-colors
### Analyzing leaf color of 10,950 [iNaturalist](https://www.inaturalist.org/) observations of Red Maple (*Acer rubrum*)Using a deep learning based object detector, [leaf-detector](https://github.com/etowahs/leaf-detector), leaf positions in each image were detected. From there, the foreground was removed from the detected leaf using GrabCut algorithm. Dominant color of the leaf was calculated using k-means clustering.
![2019 data](all-2019-data.jpg)
Figure 1 (above): All the 2019 data plotted on the same map. The color of each observation marker corresponds to the dominant color of the leaves of the observation.
## Usage
``` python
from leafcolors.leafcolors import LeafColorsdetector_output = 'output.txt' # output of leaf-detector batch detection
img_folder = '2015/' # folder of images that darknet detectedmy_analysis = LeafColors(detector_output, img_folder)
```
For the output of leaf-detector, be sure to remove the first few lines of metadata before passing it to LeafColors.