This project is a single-object military target tracking system built using OpenCV and Streamlit.
It uses adaptive template matching to track a military vehicle (tank, jeep, etc.) in video streams.
The app provides an interactive interface to upload videos, set an initial bounding box (ROI), and export the tracked video.
- Upload a video in MP4, AVI, or MOV formats
- Preview the first frame with pixel grid to set bounding box accurately
- Manual Bounding Box (x, y, width, height) input
- Adaptive template matching for robust tracking
- Visual overlays: bounding box, crosshair, aim circle
- FPS display for performance monitoring
- Export tracked video with annotations and aim lock indicators
- Temporary storage for uploaded videos ensures smooth processing
- OpenCV (cv2) → Template matching and video processing
- NumPy → Array manipulation and pixel-level operations
- Streamlit → Web interface and UI
- Matplotlib → Preview first frame with grids
- Python Standard Libraries → time, os, tempfile for file handling
- Rayyan Ahmed
- Google Certified AI Prompt Specialist
- IBM Certified LLM Fine Tuning Expert
- Hugging Face Certified LLM Fundamentalist
- AI Expertise: Python, OOPs, DSA, EDA, DataBases, ML, DL, CV, NLP, LLM, GenAI, AgenticAI
├── LICENSE
├── README.md
├── Sot Architecture.png
├── app.py
└── app2.py
└── requirements.txt
└── sot-3.ipynb
- Open the app link in your browser
- Upload the video file you want to track
- Preview the first frame to estimate bounding box coordinates
- Enter x, y, width, height values in the sidebar
- Set a custom output filename
- Click 🚀 Start Tracking
- Download the processed video when ready
- Coordinates start from the top-left corner (0,0)
- Accurate bounding box improves tracking performance
- Tracking template updates every 10 frames to adapt to changes
- Bright or dark frames are automatically inverted for better template matching
Don't use without permission
This project is developed for educational purposes and demo use.
Please do not use for actual military applications.
