ADITYA KUMAR commited on
Commit
f5aaa60
·
1 Parent(s): 2e78810

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +40 -0
README.md CHANGED
@@ -1,3 +1,43 @@
1
  ---
2
  license: unknown
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: unknown
3
  ---
4
+ ---
5
+ language: en
6
+ pipeline_tag: image-classification
7
+ task: Image Color Extraction
8
+ ---
9
+
10
+ # Image Color Extraction Model
11
+
12
+ This model performs color extraction from an image using KMeans clustering. Given an input image, the model identifies the dominant colors present in the image and returns their HEX codes, along with the color closest to white.
13
+
14
+ Model Details:
15
+ - Model Type: Color Extraction
16
+ - Model Name: ColorExtractionPipeline
17
+ - Architecture: KMeans Clustering
18
+ - Compatible Transformers Library Version: >=4.11.0
19
+
20
+ Input Format:
21
+ - The model takes an image in the form of a PIL (Python Imaging Library) image.
22
+
23
+ Output Format:
24
+ - A list of HEX codes representing the dominant colors in the image.
25
+ - The HEX code of the color closest to white in the image.
26
+
27
+ Usage:
28
+ ```python
29
+ from transformers import pipeline
30
+ from PIL import Image
31
+
32
+ # Load the color extraction pipeline
33
+ color_extraction = pipeline("color-extraction")
34
+
35
+ # Load an image using PIL (Python Imaging Library)
36
+ image = Image.open("path/to/your/image.jpg")
37
+
38
+ # Perform color extraction on the image
39
+ colors, closest_to_white = color_extraction(image)
40
+
41
+ # Print the results
42
+ print("Dominant Colors:", colors)
43
+ print("Color Closest to White:", closest_to_white)