Learning Deep Representations, Embeddings And Codes From The Pixel Level Of Natural And Medical Images