Automated Detection in NYC Traffic Cam Footage #1296
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automated Detection in NYC Traffic Cam Footage | |
on: | |
schedule: | |
- cron: '*/15 * * * *' # Run every 15 minutes | |
jobs: | |
detect-objects: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.ACCESS_TOKEN_2 }} | |
ref: ${{ github.event.before }} | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests beautifulsoup4 torch torchvision pycocotools | |
- name: Run Object Detection Script | |
run: | | |
python detect_objects.py | |
- name: Commit and Push Changes | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: Storing Detected Objects in DB | |
file_pattern: detections.db |