You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a great work. I have created new reduced images and annotations successfully. I am wondering is there a way to keep original files name instead of assigning new names. I have the following code
def main():
images_path = os.path.join(os.getcwd(), "images")
annotations_path = os.path.join(os.getcwd(), "Annotation")
# Define the name of the dataset
dbName = "CarsDataset"
# Create an object of ObjectDetectionDataset
obda = ObjectDetectionDataset(imagesDirectory=images_path, annotationsDirectory=annotations_path, databaseName = dbName)
# Reduce the dataset to smaller Rois of smaller ROIs of shape 1092 x 1080.
offset=[480, 360]
images_output_path = os.path.join(os.getcwd(), "images_reduced")
annotations_output_path = os.path.join(os.getcwd(), "Annotation_reduced")
obda.reduceDatasetByRois(offset = offset, outputImageDirectory = images_output_path, outputAnnotationDirectory = annotations_output_path)
if __name__ == "__main__":
main()
this code append CarsDataset at the start of each image and it assigns some ids to each image. What I want is to keep original image names, for example if my file name is image_1 and your library create four crops, I want to name those crops as image_1_1, .... images_1_4. Thank you for your suggestions.
The text was updated successfully, but these errors were encountered:
@baicaigithub Could please you give an example on how your fork retains filenames? I checked your link, the example provided is still the same as on the original page. Thank you.
Dear @lozuwa
This is a great work. I have created new reduced images and annotations successfully. I am wondering is there a way to keep original files name instead of assigning new names. I have the following code
this code append CarsDataset at the start of each image and it assigns some ids to each image. What I want is to keep original image names, for example if my file name is
image_1
and your library create four crops, I want to name those crops asimage_1_1, .... images_1_4
. Thank you for your suggestions.The text was updated successfully, but these errors were encountered: