Skip to content

amirzenoozi/image-color-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Color Analyzer By Using Python

In this simple script we extract the image colors by using python and KMeans clustring method

Requierments

pip install -r requirements.txt

Features

  • Pie Chart
  • CLI
  • Telegram Bot
  • Rest API
  • Video Files

CLI Options

--src       Your Target File Path       #default: sample.jpg
--clusters  Number of KMeans Cluster    #default: 5
--dest      Your Target File Path       #default: results

How To Use

python main.py --src PATH_TO_YOUR_IMAGE --clusters 5 --dest FOLDER_NAME

How To Serve API Server

You Only Need To Install Uvicorn Library For Python By:

pip install uvicorn

or

pip install -r requirements.txt

and run

python server.py

How To Serve Telegram Bot

Firstly, You Need To Get API_TOKEN from Bot_Fother and put it in .env File Then You Just Need To Run:

python bot.py