Three easy-to-use APIs for IUST CV Lab
Explore the docs »
Report Bug
·
Request Feature
Table of Contents
This project contains three API: crop_video, csv_xml and video_partition
This one can take a video and a CSV file. It will convert the CSV file to JSON and save an image sequence from the video. It can make gifs out of image sequences as well.
You can use this API to convert CSV to XML and CSV to XML. (CSV and XML files in specific formats)
This API can split a video into multiple smaller videos.
- cd to the directory where requirements.txt is located
- run: pip install -r requirements.txt to install all you need
- cd to the directory where api.py and utils.py are located
- run: python -m uvicorn api:app --reload to run the live server
- Go to this URL: http://127.0.0.1:8000/docs
- Click the /crop_image/
- Click the try it out button
- Fill in the camera_name field
- Choose a crop_type
- Choose if you want gifs or not
- Upload a video
- Upload a CSV file
- Click Execute button
JSON file will be saved in the json folder, image sequences will be saved in the frame_sequence folder and gifs will be saved in the gif folder.
- Go to this URL: http://127.0.0.1:8000/docs
- Click the /csv_xml/
- Click the try it out button
- Upload as many CSV and XML files as you want
- Click Execute button
Now you can download the zip file.
- Go to this URL: http://127.0.0.1:8000/docs
- Click the /video_partition/
- Click the try it out button
- Fill in the partition_name field
- Fill in the second_start field (The second of the start of partitioning)
- Fill in the second_end field (The second of the end of partitioning)
- Fill in the duration field (Duration of partitioning in seconds)
- Fill in the overlap_frame field
- Upload a video
- Click Execute button
Splitted videos will be saved in the partition_videos folder.