pythonlessons / mltu

Machine Learning Training Utilities (for TensorFlow and PyTorch)
MIT License
160 stars 100 forks source link

cv2 error #57

Open sachin7695 opened 1 week ago

sachin7695 commented 1 week ago

this is the error i am getting while running the train.py script can you help me where exactly i am going wrong Traceback (most recent call last): File "E:\ML\ml_projects\project_folder\icpr\img_to_word\train.py", line 129, in model.fit( File "E:\ML\envs\python3\lib\site-packages\keras\utils\traceback_utils.py", line 70, in error_handler raise e.with_traceback(filtered_tb) from None File "E:\ML\envs\python3\lib\site-packages\mltu\dataProvider.py", line 142, in getitem data, annotation = preprocessor(data, annotation) File "E:\ML\envs\python3\lib\site-packages\mltu\preprocessors.py", line 9, in call return cv2.imread(image_path, self._method), label cv2.error: OpenCV(4.10.0) :-1: error: (-5:Bad argument) in function 'imread'

Overload resolution failed:

  • Argument 'flags' is required to be an integer
  • dst is not a numpy array, neither a scalar
  • Expected Ptr for argument 'dst'
pythonlessons commented 6 days ago

The error speaks for it self:

Specific Error Message

Common Causes

So, check if what file you try to read with openCV and try to investigate this specific file