https://github.com/timooo-thy/image-detection
This Streamlit app allows you to upload images, detect objects in them, generate text descriptions, and add metadata to the images.
https://github.com/timooo-thy/image-detection
Last synced: 8 months ago
JSON representation
This Streamlit app allows you to upload images, detect objects in them, generate text descriptions, and add metadata to the images.
- Host: GitHub
- URL: https://github.com/timooo-thy/image-detection
- Owner: timooo-thy
- Created: 2023-08-25T18:42:33.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-04T17:35:27.000Z (almost 3 years ago)
- Last Synced: 2024-12-29T00:07:33.264Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 14.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Detection (Write Metadata) Streamlit App
Welcome to the Image Detection (Write Metadata) Streamlit App!
With this Streamlit app, you can easily:
-Upload images
-Detect objects within them
-Generate text descriptions
-Add metadata to the images
The models employed in this app are sourced from [Hugging Face](https://huggingface.co) and include "facebook/detr-resnet-50" for object detection and "Salesforce/blip-image-captioning-base" for text generation.
## Getting Started
Follow these steps to set up and run the Streamlit app on your local machine.
## Prerequisites
- Python (>=3.9)
- pip (Python package manager)
## Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/timooo-thy/image-detection.git
cd image-detection
2. Create a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
3. Install the required packages:
```bash
pip install -r requirements.txt
## Setup Environment Variables
1. Create a `.env` file in the root directory of the project.
2. Add your huggingface token information to the `.env` file in the following format:
HUGGINGFACEHUB_API_TOKEN = your_api_key_here
3. Make sure to include `.env` in your `.gitignore` file to keep your sensitive information secure.
## Running the App
1. Open a terminal and navigate to the project directory.
2. Activate the virtual environment if you created one:
```bash
source venv/bin/activate # On Windows: venv\Scripts\activate
3. Run the Streamlit app:
```bash
streamlit run app.py
4. The app should open in your default web browser.
## Deploying to Production
For deploying the app to a production environment, consider deploying from Streamlit. Be sure to adjust configurations and follow deployment instructions for your chosen platform.
## Author
©Timothy Lee