Term: diamond in the rough
Example: i love jj, although he's in prison, he's got potential, he's my diamond in the rough
Definition: someone that falls into unfortunate circumstances but works to better themselves, whether it be the homeless, imprisoned etc