Perl has the Graph module. PDL has recently gained a (not CPAN yet - call it working prototype stage) module with some support for OpenCV. Other machine-learning support for PDL: AI::MXNet.
Comment on Re^2: What are people doing with Perl 5 and Raku these days?