Rekognition Discord Bot leverages the power of AWS Rekognition to analyze and compare images directly from Discord. With a simple command, you can identify objects, detect emotions, recognize celebrities, read text, and even compare faces in two different images!
- Object and Scene Detection: Identify thousands of objects such as a bicycle or sunglasses.
- Emotion Detection: Understand the sentiment behind a face like happiness, sadness, or surprise.
- Celebrity Recognition: Recognize thousands of celebrities in images.
- Text Detection: Extract text from the image.
- Face Comparison: Compare two faces to see if they are of the same person.
- Sign Up for AWS: If you do not have an AWS account, you need to sign up here.
- Set up an IAM user:
- Sign in to the AWS Management Console and open the IAM console.
- In the navigation pane, choose Users, and then choose Add user.
- Set the user name and choose Programmatic access. This provides an access key ID and secret access key for the AWS API, CLI, SDK, and other development tools.
- Set permissions by attaching the policy:
AmazonRekognitionFullAccess
. - Review and create the user. Note down the access key ID and secret access key.
- (Optional) Change the default region: By default, this bot is configured to use the
us-west-1
region. To use a different region, you can modify theregion_name
in the bot code.
-
Clone the Repository:
git clone https://github.com/RocketGod-git/rekognition-bot.git cd rekognition-bot
-
Install Dependencies:
pip install discord boto3
-
Configure the Bot:
- Edit
config.json
. - Fill in the
TOKEN
,AWS_ACCESS_KEY
, andAWS_SECRET_KEY
in theconfig.json
with your Discord bot token and AWS credentials respectively.
- Edit
-
Run the Bot:
python main.py
-
In Discord:
- Use the command
/photos
followed by attaching a photo to analyze it. - Attach a second photo to compare faces between the two images.
- Use the command
- Analyzing a Photo:
/photos
Bot will return details about the image, such as objects detected, any celebrities recognized, emotions of faces, and more.
- Comparing Faces in Two Photos:
/photos
Bot will compare the faces in the two images and provide a similarity score.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the AGPL-3.0 license.