I plan on doing a factory reset but want to back up all my pictures and contacts
Transferring your pictures can be done by connecting your phone to a computer and sending them to the computer's hard drive. If you don't have a computer available or don't want to go that route, you could also upload the pictures to a cloud service like Google+, Flickr, etc. Just a word of warning tho, if you use the cloud option I would try to use WiFi and not your cell phone's data plan as WiFi will most likely be faster and will not count against your cell phone's data (if you have a limit on your monthly cell data, that is) . These options work on both Android and iOS / Apple phones.
As far as backing up your contacts, that depends on what kind of phone you have? Is the phone Android, iOS / Apple, blackberry, Windows Phone? Let us know.