Skip to content

Instantly share code, notes, and snippets.

@AlessandroMondin
Created December 28, 2022 10:29
Show Gist options
  • Save AlessandroMondin/71319d0af0d6b35249b21cc9c6498f54 to your computer and use it in GitHub Desktop.
Save AlessandroMondin/71319d0af0d6b35249b21cc9c6498f54 to your computer and use it in GitHub Desktop.
img_name = self.annotations.iloc[idx, 0]
tg_height = self.annotations.iloc[idx, 1] if self.rect_training else 640
tg_width = self.annotations.iloc[idx, 2] if self.rect_training else 640
# img_name[:-4] to remove the .jpg or .png which are coco img formats
label_path = os.path.join(self.root_directory, "labels", self.annot_folder, img_name[:-4] + ".txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment