Detection and mask finding codemerged