object-detection
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.6%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: Rojanna
- Language: Python
- Default Branch: main
- Size: 12.7 MB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
YOLOv5 Object Detection Web Application
This is a Flask-based web application that allows users to upload images or videos for object detection using the YOLOv5 model. The application processes the uploaded files and displays the results along with the detected objects.
Features
- Upload images (PNG, JPG, JPEG) or videos (MP4, AVI, MOV).
- Process uploaded files using the YOLOv5 object detection model.
- Display results with annotated images or videos showing detected objects.
- Provide a list of detected objects.
Requirements
- Python 3.7 or higher
- Flask
- PyTorch
- OpenCV
- Pillow
Installation
Clone the repository:
bash git clone https://github.com/your-username/your-repo-name.git cd your-repo-nameCreate and activate a virtual environment:
bash python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`Install the required packages:
bash pip install -r requirements.txtEnsure the following directories exist:
bash mkdir uploads static/results
Running the Application
Start the Flask server:
bash python app.pyOpen a web browser and go to
http://127.0.0.1:5000/.
Usage
- On the main page, upload an image or video file.
- The application will process the file and redirect to the results page.
- The results page will display the processed file with annotated detections and list the detected objects.
File Structure
app.py: The main Flask application file.templates/upload.html: The HTML template for the file upload page.templates/uploaded.html: The HTML template for the results page.uploads/: Directory to store uploaded files.static/results/: Directory to store processed files and results.
Code Explanation
- Import Statements: Import necessary libraries and modules.
- Configuration: Define upload and results folders and allowed file extensions.
- YOLOv5 Model Loading: Load the YOLOv5 model using PyTorch Hub.
- Utility Functions:
allowed_file(filename): Check if the file has an allowed extension.
- Routes:
upload_file(): Handle file upload and processing.uploaded_file(): Display the processed file and detected objects.
Contributing
Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to customize this README to suit your specific application and repository details.
Owner
- Login: Rojanna
- Kind: user
- Repositories: 1
- Profile: https://github.com/Rojanna
Citation (CITATION.cff)
cff-version: 1.2.0
preferred-citation:
type: software
message: If you use YOLOv5, please cite it as below.
authors:
- family-names: Jocher
given-names: Glenn
orcid: "https://orcid.org/0000-0001-5950-6979"
title: "YOLOv5 by Ultralytics"
version: 7.0
doi: 10.5281/zenodo.3908559
date-released: 2020-5-29
license: AGPL-3.0
url: "https://github.com/ultralytics/yolov5"
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Dependencies
- matplotlib >=3.3.0
- numpy >=1.22.2
- opencv-python >=4.6.0
- pandas >=1.1.4
- pillow >=7.1.2
- psutil *
- py-cpuinfo *
- pyyaml >=5.3.1
- requests >=2.23.0
- scipy >=1.4.1
- seaborn >=0.11.0
- thop >=0.1.1
- torch >=1.8.0
- torchvision >=0.9.0
- tqdm >=4.64.0
- ultralytics >=8.1.47
- PyYAML >=5.3.1
- gitpython >=3.1.30
- matplotlib >=3.3
- numpy >=1.23.5
- opencv-python >=4.1.1
- pandas >=1.1.4
- pillow >=10.3.0
- psutil *
- requests >=2.32.0
- scipy >=1.4.1
- seaborn >=0.11.0
- setuptools >=65.5.1
- thop >=0.1.1
- torchvision >=0.9.0
- tqdm >=4.64.0