make detector work across scales