brew install opencv cmake ffmpeg@4For installing OpenCV, I suggest to follow https://gocv.io/getting-started/linux/ tutorial; it has build commands for building OpenCV with CUDA support as well.
cd ./cmd/ml && ./download_data_v4.shcd ./cmd/ml && go build .
./ml --settings=config.jsonChange "source" in config.json to "webcam". Don't forget to check "device_id" value in "video_capture_device" object.