wando-warden can watch terminal cameras (such as those at Wando Welch), read the timestamp from the image, and count the number of trucks.
wando-warden comes with a streamlit app that can be used to configure the app, manually scan cameras, and visualize the data.
Clone this repository:
git clone https://github.com/hunterjsb/wando-warden.git
cd wando-warden
Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
Install the required dependencies:
pip install -r requirements.txt
Edit the terminals.yaml
file to configure your terminals and cameras.
Set up environment variables for sensitive information. See .env.example.
Run the streamlit app dashboard with:
streamlit run app.py
Run the main script with the following command:
python -m warden --detect-trucks
--terminals
: Path to the YAML file containing terminal configurations (default: '../terminals.yaml')--storage
: Choose between 'local' or 's3' storage (default: 's3')--log-level
: Set the logging level (default: 'INFO')--db
: Database to store object detection results (default: ')Run with default settings (S3 for photos, DynamoDB for results):
python -m warden
Use local photo storage and debug logging:
python -m warden --storage local --log-level DEBUG
Detect trucks and store the results in a postgresql db:
python -m warden --db postgres --detect-trucks
The Warden system now supports truck detection using AWS Rekognition. To use this feature:
AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
environment variables with your AWS credentials.--detect-trucks
flag when running the script:
python -m warden --detect-trucks
The truck detection data is stored in a SQLite database. By default, it's saved as truck_detections.db
in the current directory. See DB options below.
The Warden system now supports multiple database options for storing truck detection results:
To specify the database type, use the --db
flag:
python -m warden --detect-trucks --db [sqlite|mysql|postgres|dynamodb]
For each database type, you need to set the appropriate environment variables, the names are found in .env.example.
Note: For DynamoDB, ensure that you have the necessary AWS permissions and credentials set up.
To extend or modify the Warden system:
terminal.py
memory.py
ocr.py
detection.py
config.py
This project is licensed under MIT-0. See the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any problems or have any questions, please open an issue on the GitHub repository.