Get ready for cutting-edge object detection magic! This web app combines the power of YOLOv8 ๐ for object detection and segmentation with the simplicity of the Streamlit framework to deliver real-time object detection and tracking in video streams. โจ๐ฅ
- ๐๐ We are excited to announce that our team, MyInvictIA, has secured the third position in the Huawei ICT Competition at the Innovate Stage 2023-24! We are honored by this achievement and also pleased for participating in the last Castilla y Leรณn's Boards Innovation Contest 2024.
- Examples of the app running.
- Examples of API usage.
- ๐ Migrate the application to a new Dashboard based on Vue.js and Flask among others.
- Check out this app in action ๐โโ๏ธ โ it's up and running on the Streamlit cloud server! โ๏ธ Thanks to the fantastic folks at Streamlit for supporting the community with cloud uploads. Here's where you can see it live:
- Demo Web App Avaidable
โ ๏ธ Note: The cloud server may take a few seconds to load the app. Please be patient! ๐ฐ๏ธ
Coming soon! ๐น Stay tuned for a demo showcasing this awesome feature
- Home page ๐
curl -X 'POST' 'http://local-ip-address:8000/detect_img' -H 'accept: application/json' -F 'image=@IMAGE_NAME.jpg;type=image/jepg'
- aiofiles==23.2.1
- fastapi==0.110.2
- numpy==1.24.4
- opencv_contrib_python_headless==4.9.0.80
- lapx==0.5.7
- python-multipart==0.0.9
- python-dateutil==2.8.2
- DateTime==5.5
- pandas==2.0.3
- Pillow==10.3.0
- pytube==15.0.0
- Requests==2.31.0
- streamlit==1.33.0
- ultralytics==8.2.22
- uvicorn==0.29.0
- torch==2.2.2+cpu
- torchvision==0.17.2+cpu
- If you already have Python installed, you can skip the following steps until cloning the repo, if not run the following commands to install Python 3.10 in Ubuntu.
- Update Ubuntu before installing Python:
sudo apt update && sudo apt upgrade
- Import Python PPA on Ubuntu:
sudo add-apt-repository ppa:deadsnakes/ppa
- Refresh APT Sources List for Python PPA on Ubuntu:
sudo apt update
- Install Python 3.10 on Ubuntu:
sudo apt install python3.10 && sudo apt install python3.10-venv
- Verify Python 3.10 Installation on Ubuntu:
python3.10 --version
- Clone this repo:
git clone https://github.com/MyInvictIA/yolov8-streamlit-fireant-tracking.git
- Hop into the directory:
cd yolov8-streamlit-fireant-tracking/yolov8_app/
- Run the following command to create a python environment:
python3.10 -m venv env
- Activate the environment with:
source env/bin/activate
- Install the requirements:
pip install -r requirements.txt
- Run the app:
streamlit run app.py --server.port 8501 & uvicorn main:app --host 0.0.0.0 --port 8000 --reload
- Open a browser and get into the following URL for the Web App:
http://localhost:8501
- Open a browser and get into the following URL for the API:
http://localhost:8000/docs
- Clone this repo:
git clone https://github.com/MyInvictIA/yolov8-streamlit-fireant-tracking.git
- Hop into the directory:
cd yolov8-streamlit-fireant-tracking/
- Launch the app:
docker-compose -f ./docker-compose.yml up -d
- And if you want to sync changes in real-time:
docker-compose -f .\docker-compose.yml watch
- Open a browser and get into the following URL for the Web App:
http://localhost:8501
- Open a browser and get into the following URL for the API:
http://localhost:8000/docs
- Task time! Choose your mission: ๐ฏ Segmentation* supported only.
- Set your confidence level for the model, using the slider to adjust the confidence threshold (25-100).
- Once the model config is good to go, pick your source.
- The default image and its object-detected counterpart are proudly displayed on the main page.
- Choose your source (the "Image" radio button โ ready for local uploads or internet images).
- Click "Browse files" to upload your image.
- Hit the "Detect Objects" button, and watch the object detection algorithm work its magic on your image with your chosen confidence threshold.
- The result โ your image with detected objects โ will appear. Click "Download Image" to save it!
- Demo Coming soon!.
- Press on
Detect Objects in Video
button and the selected task will start on the selected video.
- Select the RTSP stream button
- Enter the RTSP URL and press the "Detect Objects" button
- Choose YouTube as your source
- Paste the URL into the text box.
- Let the detection/segmentation task do its thing on the YouTube video!
- This app owes its awesome object detection skills to the YOLOv8 algorithm (https://github.com/ultralytics/ultralytics).
- The Streamlit library (https://github.com/streamlit/streamlit) makes building the user interface a breeze.
- The original code is based in the source code from CodingMantras/yolov8-streamlit-detection-tracking
- This project is currently rockin' the educational world. Hold tight before deploying it in production environments! ๐
- If you love this repo, don't forget to leave a star! โญ
This project has taken part in the following contests and competitions: