All Projects → christianreimer → treescore

christianreimer / treescore

Licence: MIT License
Score a Christmas Tree based on uniformity of lights, shape of tree, and colors used.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to treescore

pghumor
Is This a Joke? Humor Detection in Spanish Tweets
Stars: ✭ 48 (+108.7%)
Mutual labels:  humor
datastories-semeval2017-task6
Deep-learning model presented in "DataStories at SemEval-2017 Task 6: Siamese LSTM with Attention for Humorous Text Comparison".
Stars: ✭ 20 (-13.04%)
Mutual labels:  humor
Lolcommits
📷 git-based selfies for software developers
Stars: ✭ 4,468 (+19326.09%)
Mutual labels:  humor
awesome-programming-humor
Awesome software, subreddits, websites, and other cool stuff that programmers would find funny.
Stars: ✭ 32 (+39.13%)
Mutual labels:  humor
jolly-code
😆 Not all code has to be serious business™
Stars: ✭ 12 (-47.83%)
Mutual labels:  humor

treescore

Score a Christmas Tree based on uniformity of lights, shape of tree, and colors used.

Writeup with pretty pictures can be see at http://christianreimer.github.io/treescore/

Simple Example

>>> import treescore
>>> fname = 'path/to/image/of/tree.png'
>>> picker = treescore.RegressionColorPicker.from_file('model.data')
>>> scores, images, composite = treescore.judge.score(fname, picker, images=True)
>>> print(scores)
Scores(overall=65, led=85, shape=97, color=12, area=0.290468)
>>> treescore.judge.utils.display_img(composite)
>>>

This should display an image such as the following (depending on your tree of course) original image

Installation

OpenCV (http://opencv.org/) is used and you will need to install it. This will probably be the biggest challenge you will encounter. You can follow the instructions for python3 and OpenCV version 3 over at http://www.pyimagesearch.com/opencv-tutorials-resources-guides

Once you have OpenCV and the python bindings installed, the rest should be as easy as

$ mkvirtualenv treescore
$ git clone https://github.com/christianreimer/treescore.git
$ cd treescore
$ pip install -r requirements.txt
$ ./judge --help
$

Todo

There is still a lot of work to do to accurately detect colors and hence mask out the tree itself.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].