When I’ve done similar things in the past I found there was always a library for barcode/QR use cases before such things ended up being built into the OS/Framework I’m in.
https://serratus.github.io/quaggaJS/ seems browser friendly?
Generally I agree with your point on AI fuzziness here not being useful.