In the Kaggle datasets/speech_bubbles_dataset/writing_area_labels.csv file, the 'imagename' entries contain a "~" character in their paths, whereas the actual file paths in the speech_bubbles_dataset/files/ directory use a "-" character instead.
wrong: "datasets/speech_bubbles_dataset/files/white~friendlystock-chat-bubble-47.png"
correct: "datasets/speech_bubbles_dataset/files/white-friendlystock-chat-bubble-47.png"
As a workaround, I've implemented a simple string replacement operation in my local script to replace the "~" character with "-", and the function is working as expected.
main.py 128 and 191 you can add, after the initial speech_bubble_tags declaration so that:
speech_bubble_tags = pd.read_csv(speech_bubbles_path +
"writing_area_labels.csv")
# Replace "~" with "-" in the 'imagename' column to match the file paths
speech_bubble_tags['imagename'] = speech_bubble_tags['imagename'].str.replace('~', '-') # fix kaggle path error
Error logs:
Testing:
FAILURES test_speech_bubble_dumping
speech_bubble_writing_area = speech_bubble_tags[area_idx]['label']
speech_bubble_writing_area = speech_bubble_writing_area.values[0]
E IndexError: index 0 is out of bounds for axis 0 with size 0
preprocesing/layout_engine/page_dataset_creator.py:1546: IndexError
Traceback (most recent call last):
File "main.py", line 203, in
speech_bubble_tags
File "/home/john/Desktop/translate/artificial_manga_panel_dataset/preprocesing/layout_engine/page_dataset_creator.py", line 2365, in create_page_metadata
speech_bubble_tags
File "/home/john/Desktop/translate/artificial_manga_panel_dataset/preprocesing/layout_engine/page_dataset_creator.py", line 1660, in populate_panels
minimum_speech_bubbles
File "/home/john/Desktop/translate/artificial_manga_panel_dataset/preprocesing/layout_engine/page_dataset_creator.py", line 1546, in create_single_panel_metadata
speech_bubble_writing_area = speech_bubble_writing_area.values[0]
IndexError: index 0 is out of bounds for axis 0 with size 0
P.S. This project is really awesome thank you!