algolia / color-extractor Goto Github PK
View Code? Open in Web Editor NEWExtract the dominant color(s) of your fashion articles!
Home Page: https://algolia.com
License: Other
Extract the dominant color(s) of your fashion articles!
Home Page: https://algolia.com
License: Other
Is this project still maintained? I found two bugs inside resize that makes the project unusable and no updates for a year.
I am having a hard time trying to figure out of your Back code works. I am trying to remove the background from images and thought this would be a cool way to do it.
I trued running back by itself But I dont know where I import the picture
Hi,
I am trying out the command line tool.
how to use the ./color-extractor CLI tool to get the top 5 colors of my image along with their frequencies. I am able to get only one. Also please provide me the json file format for --settings option. I tried to provide 'all' option to the selector but could not make it work. Also please let me know how to pass settings while using the library from python code.
Thanks,
Shabnam
Hey Thanks for the fabulous work!
I tried and CLI is working perfectly fine. However, when tried as library in a python file, giving this error:
Traceback (most recent call last):
File "test.py", line 10, in
print(img_to_color.get(img))
File "/home/color-extractor-master/color_extractor/image_to_color.py", line 36, in get
if self._settings['debug'] is None:
KeyError: 'debug'
Non CS background so might overlook something, please help!
Thanks in advance.
In the README example, an image file is opened using opencv, which will open the file in BGR. However, the color_names.npz
dataset that comes with the repo is stored as RGB. Therefore if you use the example verbatim, you will get incorrect color identifications. Since from_file.py
uses skimage.io instead of opencv, the only corrections needed are on the README, which are:
Its not at all detecting red and yellow
> time ./color-extractor color_names.npz cq5dam.web.415.311.png
OpenCV Error: One of arguments' values is out of range (Seed point is outside of image) in floodFill, file /build/opencv/src/opencv-3.1.0/modules/imgproc/src/floodfill.cpp, line 508
Unable to find colors for cq5dam.web.415.311.png: `/build/opencv/src/opencv-3.1.0/modules/imgproc/src/floodfill.cpp:508: error: (-211) Seed point is outside of image in function floodFill
`
./color-extractor color_names.npz cq5dam.web.415.311.png 5.72s user 0.35s system 105% cpu 5.770 total
Just tried simple example by following readme but program always return error 'Unable to find colors for'. Tried with different images.
I think this app is exactly what I need for a webapp I'm building. I wanted to confirm though that when you extract colors from an image, that every single color is given a name? I'd need every single color ever extracted on the app to fall into some repeatable category, i.e., red, blue, orange, etc. From looking at the XKCD Color Survey, it looks like it's even possible to extract colors and give them names such as "banana?" Is that correct?
What about black, white and gray? Are they extracted and named as well?
Thanks
The xkcd dataset (color_names.npz
) used for KNN to predict color name from RGB values doesn't has white color.
Counter({'black': 1782,
'green': 53000,
'blue': 54785,
'brown': 10529,
'purple': 26416,
'maroon': 3283,
'red': 15476,
'pink': 13617,
'orange': 9152,
'yellow': 7857,
'mustard': 711})
In fact, it has only a few colors, not all 27 as mentioned on the blog post.
We turned to a K-Nearest-Neighbors algorithm to give color names to RGB values, thanks to the XKCD Color Survey. The XKCD survey consists of 200,000 RGB values labeled with 27 different color names (e.g. black, green, teal, etc.) that we use to train a scikit-learn KNeighborsClassifier.
How do I add white to dataset as I need it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.