Hawk-Eye Centre is an integrated data source powered by Machine Learning capabilities. Using computer vision models and pipelines from the PeekingDuck library, Hawk-Eye Centre can process large volumes of relevant information like people, furniture and cutlery from video feeds. Interested parties may then utilise this data API to perform higher level analysis and service.
Hawk-Eye Centre's APIs can be accessed via this link. Our integrated Hawk-Eye Centre Dashboard can be found at this link.
- Clone the repository
git clone https://github.com/VMP-SG/NAISC-Backend.git
- Build & Run the container with Docker
docker build -t hawk-eye-centre .
docker run -p 3000:3000 hawk-eye-centre
Hawk-Eye Centre will be hosted at http://127.0.0.1:3000 by default.
- Download Python (Only versions 3.6-3.9 supported) at https://www.python.org/downloads/
- Clone the repository
git clone https://github.com/VMP-SG/NAISC-Backend.git
- Run the following lines of code
cd NAISC-Backend/
sudo apt-get install ffmpeg libsm6 libxext6 libgeos-dev -y
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 main.py
cd ../
- Run the following lines of code
cd NAISC-Backend/
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python3 main.py
cd ../
- Run the following lines of code
cd NAISC-Backend/
python -m venv .venv
.venv/Scripts/activate
pip install -r requirements.txt
python main.py
cd ../
Description:
Starts API data streams
Response Content-Type:
text/plain
Response:
API started!
Description:
Stops API data streams
Response Content-Type:
text/plain
Response:
API stopped!
Description:
Streams all raw and processed data from Hawk-Eye Centre
Response Content-Type:
text/event-stream
Response (JSON):
{
"A": {
"raw_frame": "iVBORw0KGgoAAAANSUhEUgAABDgAAALQCAIAAA",
"labelled_frame": "iVBORw0KGgoAAAANSUhEUgAABDgAAALQCAIAAA",
"total_people_count": 0,
"zone_people_count": [3, 0, 1, 1, 2, 0, 2],
"zone_mapping": [100, 101, 102, 103, 104, 105, 0]
},
"B": {...},
"C": {...},
"D": {...}
}
Description:
Displays raw live camera feed of specified Hawker Centre Zone
URL Parameter(s):
zone_id
: ID of the Hawker Centre Zone (eg. A)
Response Content-Type:
multipart/x-mixed-replace
Response:
Raw Live Camera Feed
Description:
Displays live camera feed of specified Hawker Centre Zone with object detection bounding boxes
URL Parameter(s):
zone_id
: ID of the Hawker Centre Zone (eg. A)
Response Content-Type:
multipart/x-mixed-replace
Response:
Live Camera Feed with Bounding Boxes
Description:
Streams people count from all Hawker Centre zones
Response Content-Type:
text/event-stream
Response:
{
"E": 13,
"D": 4,
"A": 11,
"B": 7,
"C": 11
}
Description:
Streams people count for each table from specified Hawker Centre zone
URL Parameter(s):
zone_id
: ID of the Hawker Centre Zone (eg. A)
Response Content-Type:
text/event-stream
Response:
[3, 0, 1, 1, 2, 0, 2]
Description:
Streams people count from all Hawker Centre stall queues
Response Content-Type:
text/event-stream
Response:
{
"2": 1,
"0": 1,
"1": 5
}
Description:
Streams people count from specified Hawker Centre stall queue
URL Parameter(s):
stall_id
: ID of the Hawker Centre Stall (eg. 0)
Response Content-Type:
text/event-stream
Response:
0
Description:
Streams occupancy status of all tables in Hawker Centre
Response Content-Type:
text/event-stream
Response:
{
"140": false,
"141": false,
...
"122": true
}
Description:
Streams people count from all Hawker Centre tables
Response Content-Type:
text/event-stream
Response:
{
"140": 0,
"141": 0,
...
"122": 2
}
Description:
Streams people count from specified Hawker Centre table
URL Parameter(s):
table_id
: ID of the Hawker Centre Table (eg. 140)
Response Content-Type:
text/event-stream
Response:
0