Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SegCam

Raspberry-pi based camera that lets you segment and object track photo & video objects.

Setup

System

  1. Flash sd card with nixos sd image
  2. Boot raspberry pi with the sd card
  3. Connect to internet: (as root)
wpa_supplicant -B -i wlan0 -c <(wpa_passphrase 'SSID' 'password') &
  • just replace the SSID and password, don't omit the & or other symbols
  • when the command finishes check you're online with host nixos.org or ping 8.8.8.8
  • if you typo, pkill wpa_supplicant and try again
  1. [Optional] update raspberry pi firmware
    nix-shell -p raspberrypi-eeprom
    mount /dev/disk/by-label/FIRMWARE /mnt
    BOOTFS=/mnt FIRMWARE_RELEASE_STATUS=stable rpi-eeprom-update -d -a
  2. [Probably unnessesary] Generate default configs
nixos-generate-config
  1. Add nixos hardware channel
    sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
    sudo nix-channel --update
  2. Clone the repo
nix-shell -p git --run "git clone https://github.com/e-cal/segcam.git"
  1. Install
cd segcam/system && ./install
  1. Rebuild nixos
sudo nixos-rebuild boot
  1. Reboot
    • default user is segcam with password segcam
    • will need to re-setup network connection using networkmanager
      • list networks: nmcli dev wifi
      • connect: nmcli dev wifi con 'SSID' --ask

App

  1. cd segcam, do everything from this dir
  2. Install sam2
git clone https://github.com/facebookresearch/sam2.git
mkdir tmp && TMPDIR="tmp" pip install -e sam2; rmdir tmp
  1. Get model weights:
./checkpoints/download_ckpts.sh
  1. Install dependencies
pip install -r requirements.txt
  1. Run app
python app/main.py

TODO

  • make hyprland auto run and fullscreen app after setup
  • auto setup/build script (nix build system?? ref phobos)
  • [-] make the app good

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages