Facing "OSError: cannot write mode P as JPEG" issue while using auto annotate
I am encountering an issue with the a2 module and the Roboflow library when attempting to use the annotation functionality. The problem occurs when saving images in JPEG format during the annotation process.
Error Message: OSError: cannot write mode P as JPEG
Steps to Reproduce:python -m a2.annotate ^ --source_image_directory "D:\PPT images_2" ^ --target_annotation_directory "D:\PPT images_2\PPT_2" ^ --roboflow_project_id ppt-seg-kdxas ^ --roboflow_project_version 2
Install the a2 module and the Roboflow library. Run the annotation script using the following command: Observe the error message mentioned above. Additional Information:
I have verified that the source images in the specified directory are in compatible formats such as JPEG or PNG. I have also tried converting the images to JPEG format manually before running the annotation script, but the issue persists. The error occurs for multiple images in the source directory, not limited to a specific image. I have ensured that the necessary dependencies and libraries are properly installed. Expected Behavior:
I expect the annotation script to successfully save the annotated images in JPEG format without any errors.
Environment:
Operating System: windows 11 Python Version: 3.11
Please let me know if there are any specific configurations or additional information required to troubleshoot the issue. Any help or guidance in resolving this problem would be greatly appreciated.