Pass detector instance in all processing functions #3