iPhoto Decided to Erase All of my Photos Help!!!!!

How can I restore my photos in iPhoto from backup on time machine? I just want to restore the photos not the other stuff on the computer. Someone please help me because I have years worth of photos on there and this really pissed me off.
Check out the instructions at the below link:

Mac Basics: Time Machine

Original thread: https://forums.imore.com/threads/iphoto-decided-to-erase-all-of-my-photos-help.252918/