Self-Supervised Learning and Domain Adaptation for Visual Analysis