Again, it appeared as if all my photos were on both time machine and my IMAC, just the albums were gone.
Did something else happen? Like iPhoto crashed?
In that case repair and rebuild your iPhoto Library, before you upgrade to a new system. rebuilding the library will ensure, that the internal databases are consistent and will make it easier to update the iPhoto Library for compatibility with Mt. Lion.
In addition to your Time Machine backup make a copy of the iPhoto Library on an external drive.
Then follow this Help document - see the link: iPhoto 6 and later: Rebuilding the iPhoto library
There is also a nice description by Old Toad of the procedure: Rebuilding iPhoto Library 09 and Earlier
Sometimes missing library items, like albums or events are caused by having opened the wrong iPhoto library. Do you have more than one iPhoto library?
Which is why I saved on Time Machine.
How? You did run Time Machine and let it create a backup, or did you just copy the iPhoto Library to the the Time Machine drive?