Unfortunately, there is no other way out. If the tablet has been locked, then the only solution is through Factory Reset, but you shouldn't worry as the factory reset only deletes the apps, settings, and wallpapers. The content will be the same as before. No image, music, or video file will be deleted from the tablet upon using this procedure.