allow detectInIm to work with a raw image input, in addition to accepting an image id.