I have a Dataset of 1000 images and its respective 1000 labeled files. The 1000 images are in .jpg format and the 1000 label files are in .txt format. I want to change the filename of all the (1000) images and all the (1000) label files as follows:
Dataset (Currently) 001.jpg 001.txt 002.jpg 002.txt ...
Desired Result Cam03_001.jpg Cam03_001.txt Cam03_002.jpg Cam03_002.txt ...
And want to do this for all the images (.jpg files) and all the label files (.txt files), I want them to retain all the data and simply edit the filename, by adding "Cam03_" before original name. I am working on Python hoping for a solution on Python.