Human Entrance Counter is a jointly-collaborated project between SPAI and SP-RITE and its aim is to detect the amount of human traffic moving in and out of a bounded region at any given time.
The project utilizes PeekingDuck with custom nodes for human detection and tracking along with Express.js as backend controller.
- Clone the Repository with
- Git CLI
git clone https://github.com/SPAI-Team/Human-Entrance-Counter.git - GitHub Desktop App
- Add repository
- Clone repository
- Input the URL
SPAI-Team/Human-Entrance-Counter
- Git CLI
- Setting Up Conda Python Environment
conda create --name human-entrance python=3.8 conda activate human-entrance pip install peekingduck
- Open the
./human_counterdirectory in your terminal by runningcd human_counter - Run peekingduck through the terminal:
peekingduck run
- Stop Peekingduck by pressing
ctrl+cin the terminal orqon the peekingduck window.
| column | format | data type | example |
|---|---|---|---|
| time | YYYYMMDDhhmmss | string | 20211114102300 |
| footfall | int | integer | 1 |
| location | locationname | string | fc3 |
GET /history/:location/:startTime/:endTime
-
Inputs:
- locationname(
string) - startTime(
string in YYYYMMDDhhmmss) - endTime(
string in YYYYMMDDhhmmss)
- locationname(
-
Outputs:
- json array of records with each records having:
- footfallid (
int) - time (
string in YYYYMMDDhhmmss) - curentfootfall (
int) - location (
string) - netfootfall (
int)
- footfallid (
- json array of records with each records having:
-
Example:
get /history/fc1/20211111024000/20211114130000output:
[ { "footfallid": 34, "time": "20211114101000", "currentfootfall": 20, "location": "fc1", "netfootfall": 20 }, { "footfallid": 35, "time": "20211114111000", "currentfootfall": 40, "location": "fc1", "netfootfall": 20 } ]currentfootfall = total footfall(all added together), netfootfall = footfall recorded at time of record
GET /latest/:location
-
Inputs:
- locationname (
string)
- locationname (
-
Output:
- json object with 1 record
- footfallid (
int) - time (
string in YYYYMMDDhhmmss) - curentfootfall (
int) - location (
string)
- footfallid (
- json object with 1 record
-
Example:
get /latest/fc6output:
{ "footfallid": 33, "time": "20211111024500", "currentfootfall": 0, "location": "fc6" }
GET /latest/:location/:noHours
-
Inputs:
- locationname (
string) - noHours (
string)
- locationname (
-
Output:
- json object with 1 record
- footfallid (
int) - time (
string in YYYYMMDDhhmmss) - curentfootfall (
int) - location (
string)
- footfallid (
- json object with 1 record
-
Example:
get /latest/fc6/1output:
{ "footfallid": 33, "time": "20211111024500", "currentfootfall": 0, "location": "fc6" }
POST /history
-
Inputs:
- locationname(string)
- startTime(string in YYYYMMDDhhmmss)
- netfootfall (int)
-
Output:
- empty array, []
-
Example:
post /historybody:
time:20211114121500 netfootfall:30 location:fc1output: []
