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

cvtColor error #11

Open
heegwang27 opened this issue Sep 2, 2024 · 0 comments
Open

cvtColor error #11

heegwang27 opened this issue Sep 2, 2024 · 0 comments

Comments

@heegwang27
Copy link

Traceback (most recent call last):
File "/home/heegwang/Experiments/MonoDetector/tools/train.py", line 63, in
main()
File "/home/heegwang/Experiments/MonoDetector/tools/train.py", line 58, in main
engine.train()
File "/home/heegwang/Experiments/MonoDetector/tools/../engine/base_engine.py", line 115, in train
avg_loss, elapsed_time = self.train_one_epoch()
File "/home/heegwang/Experiments/MonoDetector/tools/../utils/decorators.py", line 7, in wrapper
result = function(*args, **kwargs)
File "/home/heegwang/Experiments/MonoDetector/tools/../engine/mono_engine.py", line 79, in train_one_epoch
for batch_idx, data_dict in enumerate(self.train_loader):
File "/home/heegwang/anaconda3/envs/monodetector/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 530, in next
data = self._next_data()
File "/home/heegwang/anaconda3/envs/monodetector/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 570, in _next_data
data = self._dataset_fetcher.fetch(index) # may raise StopIteration
File "/home/heegwang/anaconda3/envs/monodetector/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in fetch
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/heegwang/anaconda3/envs/monodetector/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 49, in
data = [self.dataset[idx] for idx in possibly_batched_index]
File "/home/heegwang/Experiments/MonoDetector/tools/../dataset/mono_dataset.py", line 170, in getitem
result_dict = self.transforms(result_dict)
File "/home/heegwang/Experiments/MonoDetector/tools/../transforms/base_transforms.py", line 43, in call
data_dict = transform(data_dict)
File "/home/heegwang/Experiments/MonoDetector/tools/../transforms/default_transforms.py", line 84, in call
img = self._convert_color_factory('bgr', 'hsv')(img)
File "/home/heegwang/Experiments/MonoDetector/tools/../transforms/default_transforms.py", line 119, in convert_color
out_img = cv2.cvtColor(img, code)
cv2.error: OpenCV(4.10.0) 👎 error: (-5:Bad argument) in function 'cvtColor'

Overload resolution failed:

  • src data type = 17 is not supported
  • Expected Ptrcv::UMat for argument 'src'
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