Heterogeneous to homogeneous melting transition visualized with ultrafast electron diffraction