Optical detectors on GaSe and InSe layered crystals