Ubuntu stores directory information such as what icon to display in a user specific hidden folder. The folder is ~/.local/share/gvfs-metadata. Home directory settings are stored in ~/.local/share/gvfs-metadata/home. If you change some other settings on other partitions, they are stored also in this folder with a file name using partition UUID.
To Experiment with this, first move the folder in the Home directory and restart nautilus.
Move the gvfs-metadata folder to home
mv ~/.local/share/gvfs-metadata ~
Restart nautilus by pressing ALT+F2 and typing nautilus -q. Then again bring the dash command with the previous keyboard shortcut and type nautilus. You will see that, any customized icon is reset to default.
Now again move the gvfs-metadata to it's previous location
mv ~/gvfs-metadata ~/.local/share/
Again, restart nautilus by doing nautilus -q command and open your home folder to see that, the customized icon is now back!