Toolkit to benchmark and evaluate streaming perception algorithms
Reason this release was yanked:
deprecated
Project description
sap_toolkit
This toolkit is provided as part of the Streaming Perception Challenge 2021. It includes an evaluation server module that takes care of reading frames from disk, streaming them to your application and receiving results from your application. It also generates the .json
file required by the challenge evaluation server, and can perform local evaluation if annotations are provided in the COCO format.
Installation
You can install the toolkit by using pip:
pip install sap_toolkit
Usage:
The sap_toolkit comes with two main features:
- A server module to stream frames, receive results and generate output.
- A client object to communicate with the server module.
Server:
The evaluation server can be launched using the following syntax:
python -m sap_toolkit.server \
--data-root <path-to-data> \
--annot-path <path-to-annotations> \
--overwrite <overwrite-flag> \
--out-dir <path-to-output-directory> \
--eval-config <config-file>
Client/Application:
The sap_toolkit provides an EvalClient class that can be used to communicate with the evaluation server.
The API consists of 4 calls:
sap_toolkit.EvalClient(config, state=None, verbose=True)
: Constructor for the EvalClient object. Can optionally accept a state object to initialize with a given state, which can be obtained by calling theget_state()
method of another EvalClient object (useful in multiprocessing applications).EvalClient.request_stream(seq)
: Requests the server to stream a particular sequence.EvalClient.get_frame(fid=None)
: If fid is None, returns the latest available (fid, frame) tuple. If fid is provided, returns the frame corresponding to that fid, if available.EvalClient.stop_stream()
: Requests server to processing current stream.EvalClient.close(filename='results.json')
: Closes the evaluation client object and generates theresults.json
output file.EvalClient.get_state()
: Returns the state of the current evaluation client object (which stores info such as currently processing stream and so on). Useful for multiprocessing applications.
For example applications using the sap_toolkit, check out the illustrative examples here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sap_toolkit-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9214deac4f72c7e9c2575b5375f62a1b55a10d1eac0dbd25175bd60ea2aabdf0 |
|
MD5 | f7d33b007478a5db63acb75235b5c539 |
|
BLAKE2b-256 | 4ac12b9a049781e7f70c539efac04e9f18b4251cda30a20f7f926add8c48f5a8 |