Expose detect interface

Closes #311.