I want to know how to retrieve contacts and photos after performing a factory reset on my Windows Phone 8.
Hope this video tutorial would be helpful to you.
Nice tutorial but the question is for Windows Phone, not sure if the same procedure will help?
I'd say your chances of recoverning the details on your own are virtually nil (unless you have synced them to the cloud, as ha14 suggests). If it's really important to you, contact a data recovery bureau and see if they can help you with this, but be warned - it'll cost a lot of money to recover your data!
maybe you synced photos to live online
Restore deleted contacts