This project uses a detector to analyze a surgical training video and draw detections on it. It can also save the detected frames to a specified directory.
- Python 3.x
- Torch installed
-
Clone the repository:
git clone <REPOSITORY_URL> cd <REPOSITORY_NAME>
-
Install the required dependencies:
pip install -r requirements.txt
Run the main script main.py with the following arguments:
-vor--video_path: Path to the input video file (required).-ior--interactive: Show the output in a window (optional).-sor--save_path: Path to save the output frames with detections (optional).
-
Run detection on a video and show the output in a window:
python main.py -v path/to/video.mp4 -i
-
Run detection on a video and save the detected frames to a directory:
python main.py -v path/to/video.mp4 -s path/to/save/frames
main.py: Main script that handles user input and starts the detection.detector.py: Module that contains theDetectorclass to perform detection and draw on frames.
Contributions are welcome. Feel free to open issues or pull requests to improve the project.
This project is licensed under the MIT License. See the LICENSE file for more details.