Semantic Communications for Image Recovery and Classification via Deep Joint Source and Channel Coding