automagically set detection batch size from network