There's no easy, bullet-proof way. When you're using rm to delete files rather than a file manager, it's tacitly assumed you know what you're doing / you're happy shooting yourself in the foot / you have a backup.
A search like
https://www.google.com/search?q=how+...eleted+with+rm will have various answers, which are mostly along the lines of "not really, no". You
can, however, try tools like photorec or Magic Rescue, but I don't anticipate you having much luck... Sorry! (Edit:
here's a bigger list of programmes to try)
The lesson I hope you've learnt is to make backups, and put them in places where you won't accidentally delete them... (I mount my backup drive on /media/backup)