Automatic location detection based on deep learning