Hopefully, you have iCloud Photo Library and/or Photostream enabled so that those pics will be saved to iCloud for later syncing after you've restored your device. If not, I hope you had iCloud backup enabled. If no to the above, then you can try creating a backup using iTunes on your computer prior to restoring it.