crop_image, csv_xml and video_partition APIs

Three easy-to-use APIs for IUST CV Lab
Explore the docs »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. How to use

About The Project

This project contains three API: crop_video, csv_xml and video_partition

crop_image

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.

csv_xml

You can use this API to convert CSV to XML and CSV to XML. (CSV and XML files in specific formats)

video_partition

This API can split a video into multiple smaller videos.

(back to top)

Getting Started

Prerequisites

  1. cd to the directory where requirements.txt is located
  2. run: pip install -r requirements.txt to install all you need

Installation

  1. cd to the directory where api.py and utils.py are located
  2. run: python -m uvicorn api:app --reload to run the live server

(back to top)

How to use

crop_image

  1. Go to this URL: http://127.0.0.1:8000/docs
  2. Click the /crop_image/
  3. Click the try it out button
  4. Fill in the camera_name field
  5. Choose a crop_type
  6. Choose if you want gifs or not
  7. Upload a video
  8. Upload a CSV file
  9. 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.

csv_xml

  1. Go to this URL: http://127.0.0.1:8000/docs
  2. Click the /csv_xml/
  3. Click the try it out button
  4. Upload as many CSV and XML files as you want
  5. Click Execute button

Now you can download the zip file.

video_partition

  1. Go to this URL: http://127.0.0.1:8000/docs
  2. Click the /video_partition/
  3. Click the try it out button
  4. Fill in the partition_name field
  5. Fill in the second_start field (The second of the start of partitioning)
  6. Fill in the second_end field (The second of the end of partitioning)
  7. Fill in the duration field (Duration of partitioning in seconds)
  8. Fill in the overlap_frame field
  9. Upload a video
  10. Click Execute button

Splitted videos will be saved in the partition_videos folder.

(back to top)