Field Project is a secure web application that combines advanced AI technologies for object detection and image captioning. Users can create an account, log in, and upload images to automatically detect objects and generate descriptive captions. The application stores all results in a local SQLite database for easy access and management.
Field-Project/
├── app.py # Main Streamlit application
├── database.py # Database operations (user management, results storage)
├── requirements.txt # Python dependencies
└── README.md # Project documentation
- 🔐 Secure Authentication: User registration and login with encrypted passwords
- 🎯 Accurate Object Detection: YOLOv8 nano model for real-time object detection
- 📝 Smart Image Captioning: BLIP model generates contextual image descriptions
- 💾 Database Storage: Automatic saving of results for each user session
- 🖥️ Interactive Web Interface: Clean and user-friendly Streamlit UI
- 📱 Multiple Image Formats: Support for JPG and PNG images
- Python 3.x - Primary programming language
- Streamlit - Web application framework for building the UI
- YOLOv8 (Ultralytics) - State-of-the-art object detection model
- BLIP (Salesforce) - Vision-language model for image captioning
- PyTorch - Deep learning framework for running ML models
- Bcrypt - Secure password hashing for authentication
- SQLite - Lightweight database for storing user data and results
- Pillow (PIL) - Image processing library
- OpenCV - Computer vision library for image operations
- Python 3.8 or higher
- pip (Python package manager)
- Git
git clone https://github.com/Hmzask/Field-Project.git
cd Field-Projectpython -m venv venvActivate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
pip install -r requirements.txtThis will install all required packages:
- streamlit
- ultralytics
- transformers
- torch
- pillow
- opencv-python
- sqlitebrowser
streamlit run app.pyThe application will start and you can access it in your browser at http://localhost:8501
-
Register a New Account:
- Select "Register" from the Login/Register menu
- Enter your desired username and password
- Click the "Register" button
-
Login:
- Select "Login" from the menu
- Enter your credentials
- Click the "Login" button
-
Upload and Analyze an Image:
- Once logged in, click "Upload Image" button
- Select a JPG or PNG image from your device
- The app will:
- Display the original image
- Show detected objects with bounding boxes
- Generate and display a caption describing the image
- Save the results to the database
All dependencies are listed in requirements.txt and will be installed automatically when you run:
pip install -r requirements.txtContributions are welcome! Feel free to:
- Report bugs by opening an issue
- Suggest enhancements
- Submit pull requests with improvements
This project is open source and available under the MIT License.
If port 8501 is already in use, run:
streamlit run app.py --server.port 8502On first run, the application will download YOLOv8 and BLIP models. This may take a few minutes depending on your internet connection.
If you have a CUDA-capable GPU, PyTorch will automatically use it. For CPU-only systems, the application will work but be slower.
For questions or support, please open an issue on the GitHub repository.
-----Hamza
