{"id":38655667,"url":"https://github.com/conservationtechlab/scrubcam","last_synced_at":"2026-01-17T09:26:31.449Z","repository":{"id":43249430,"uuid":"367170853","full_name":"conservationtechlab/scrubcam","owner":"conservationtechlab","description":"Code for Edge-AI-enabled field wildlife camera","archived":false,"fork":false,"pushed_at":"2024-11-27T23:37:40.000Z","size":143,"stargazers_count":6,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-17T01:24:01.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conservationtechlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-13T20:47:04.000Z","updated_at":"2024-11-27T23:36:33.000Z","dependencies_parsed_at":"2024-11-28T00:23:24.035Z","dependency_job_id":"287dd618-be30-4e9c-8fa8-ebab601daf5f","html_url":"https://github.com/conservationtechlab/scrubcam","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/conservationtechlab/scrubcam","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conservationtechlab%2Fscrubcam","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conservationtechlab%2Fscrubcam/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conservationtechlab%2Fscrubcam/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conservationtechlab%2Fscrubcam/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conservationtechlab","download_url":"https://codeload.github.com/conservationtechlab/scrubcam/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conservationtechlab%2Fscrubcam/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505550,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T09:26:31.301Z","updated_at":"2026-01-17T09:26:31.413Z","avatar_url":"https://github.com/conservationtechlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nControl code and utilities for ScrubCam, an edge-AI-enabled field\nwildlife camera system.\n\n# Hardware\n\nThe target hardware for the field device is a Raspberry Pi 4 Model B\nsingle board computer with a Picamera-style camera, a Google Coral USB\nAccelerator, and the AdaFruit PiTFT screen (2.8\" resistive touch model\nwith 4 GPIO-connected buttons) attached. Typically several storage\ndevices are connected via the USB ports on the Pi (e.g. uSD card\nreaders). This hardware is typically integrated into a larger assembly\nthat includes a weatherproof enclosure and batteries and--in some\nvariants--a charge controller with external solar panels.\n\n# Operating System\n\nCurrently, the system runs and has been tested on Raspian Stretch and\nBuster.  Problems have been encountered with Bullseye that are\nbelieved to be mostly (if not entirely) linked to picamera no longer\nbeing supported and replaced by picamera2. At some point the ScrubCam\ndevelopers will decide whether to switch the system over to picamera2\nor provide instructions here for re-enabling the legacy camera stack.\n\n# Setup\n\n### Clone the ScrubCam repo\n\n    git clone https://github.com/icr-ctl/scrubcam.git\n\n### Install and set up virtualenv and virtualenvwrapper \n\n    sudo pip3 install virtualenv virtualenvwrapper\n\n    echo -e \"\\n# Virtualenv and virtualenvwrapper stuff\" \u003e\u003e ~/.bashrc\n    echo \"export WORKON_HOME=$HOME/.virtualenvs\" \u003e\u003e ~/.bashrc\n    echo \"export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3\" \u003e\u003e ~/.bashrc\n    echo \"source /usr/local/bin/virtualenvwrapper.sh\" \u003e\u003e ~/.bashrc\n    source ~/.bashrc\n\n### Create virtual environment for scrubcam project\n\nCreate a virtual environment named \"scrubcam_env\":\n\n    mkvirtualenv scrubcam_env\n\nNote that ScrubCam requires Python 3 so if the default on your system is\nPython 2 (it is on Stretch and Buster), make sure the virtual\nenvironment will use Python 3 by using this command instead:\n\n    mkvirtualenv scrubcam_env -p python3\n\nActivate virtual environment (not necessary if you just made it):\n\n    workon scrubcam_env\n\n### Install ScrubCam dependencies\n\n#### Update apt package sources list\n\n    sudo apt update\n\n#### Run installation script\n\nNavigate to inside of the local copy of the scrubcam code repository\nand run the install script:\n\n    cd scrubcam\n    ./install_on_pi.sh\n\nAdditionally, the install script will enable the camera, if not\nalready enabled.\n\nNote: this install script is intended for installing on a Pi. If you\nare installing on your regular computer to access some of the ScrubCam\ntools that are useful there, we should probably make an install script\nfor you. In the meantime the main thing you want to do is:\n\n    pip install .\n\nThis will install the required dependencies, which do not include Pi\nspecific dependencies.\n\n### PyCoral Dependencies\n\nScrubcam uses the Google Coral USB Accelerator and the associated\npackages to interface with this hardware cannot be installed with pip\nand their installation is not currently included in the install\nscript.\n\n#### Install PyCoral Packages using included script\n\nRun the following script to install apt packages needed for the\nPyCoral to work.  The script will prompt for a reboot; this is only\nnecessary if you don't have physical access to the system to\nunplug/replug the Coral USB Accelerator.\n\n    ./install_pycoral.sh\n\n#### Link PyCoral packages into virtual environment\n\nTo be able to access the PyCoral packages from within your virtual\nenvironment you must create symlinks within the virtual environment\nfiles to where they are located.\n\nLocate the packages:\n    \n    dpkg -L python3-pycoral\n    dpkg -L python3-tflite-runtime\n\nFor each of those two packages, find a line similar to\n\"/usr/lib/python3/dist-packages/pycoral\"\n\nGo into the folder of the virtual environment you created (we used\n`scrubcam_env` above) and create a symlink for each of those packages\ndepending on where they are actually located on your system.  For\nexample:\n\n    cd ~/.virtualenvs/scrubcam_env/lib/python3.7/site-packages/\n    ln -s /usr/lib/python3/dist-packages/pycoral\n    ln -s /usr/lib/python3/dist-packages/tflite_runtime\n\nNote that `.virtualenvs` is where we set up for virtual environments\nto go (e.g. those created using `mkvirtualenv`) but this may not be\nthe case if using `venv` or `virtualenv` to create the virtual\nenvironment. Replace `.virtualenvs` with the folder that your virtual\nenvironment is saved to. This may be a regular folder in some\ninstances.\n    \n### Get models for testing everything is working\n\nInstall package that includes some models that we can use to test\nthings: \n\n    sudo apt install pycoral-examples\n\nNow there should be a bunch of models in\n`/usr/share/pycoral/examples/models`.  One of these is actually used\nby the example config file in `cfgs` folder.\n\nNote: If you did the full set of steps from the PyCoral website above\nyou would have installed one MobileNet image classifier model. There\nare similar workflows/scripts within that repo to get some of the same\nmodels that are in `pycoral-examples`.\n\n# Usage\n\n## On Raspberry Pi \n\nThe core program in the project is `scrubcam.py` which runs on the\nRaspberry Pi which is controlling the field device. It accepts a YAML\nconfiguration file as a command line argument. There is an example\nconfig file `./cfgs/config.yaml.example`\n\nYou can copy this example file and modify it to your specific purposes\nand thus then run ScrubCam on a properly set up system (see Setup\nsection above for how to set up system) via:\n\n```\nUsage:\n    ./scrubcam.py [OPTIONS] cfgs/YOUR_CONFIG_FILE.yaml\n    \nOptions:\n    -h, --help          Output a usage message and exit\n    -c, --continue      Continue saving images to the most recent session on ScrubDash\n```\n\n## On remote server: ScrubDash\n\nFor monitoring the activity of a ScrubCam there is also a\nPlotly-Dash-based server/dashboard program called `scrubdash.py`\nintended to be run on a machine on the same network (e.g. back in the\nlab or on a laptop in the\nfield). [Scrubdash](https://github.com/icr-ctl/scrubdash) is used to\norganize, visualize, and analyze images that are sent by ScrubCams.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconservationtechlab%2Fscrubcam","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconservationtechlab%2Fscrubcam","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconservationtechlab%2Fscrubcam/lists"}