You can easily restore the images if you have a back up. If you don't have , I'm afraid you have to delete the products and re-import. To make sure you are deleting images not used in products, go to media folder, click the list mode, click Unattached in the dropdown and click filter. Take note...