test factory build_detector now no longer requires img as first argument