Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError #12

Open
lovemuyao opened this issue Dec 29, 2023 · 0 comments
Open

IndexError #12

lovemuyao opened this issue Dec 29, 2023 · 0 comments

Comments

@lovemuyao
Copy link

Traceback (most recent call last):
File "D:\Users\pythonProject\GDIP-Yolo-main\GDIP-Yolo-main\utils\datasets.py", line 187, in
File "D:\ProgramFiles\anaconda3\envs\pytorch1.12\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\ProgramFiles\anaconda3\envs\pytorch1.12\lib\site-packages\torch\utils\data_utils\fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "D:\Users\pythonProject\GDIP-Yolo-main\GDIP-Yolo-main\utils\datasets.py", line 32, in getitem
img_org, bboxes_org = self.__parse_annotation(self.__annotations[item])
File "D:\Users\pythonProject\GDIP-Yolo-main\GDIP-Yolo-main\utils\datasets.py", line 81, in __parse_annotation
img, bboxes = dataAug.RandomHorizontalFilp()(np.copy(img), np.copy(bboxes))
File "..\utils\data_augment.py", line 16, in call
bboxes[:, [0, 2]] = w_img - bboxes[:, [2, 0]]

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant