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
Issue when segmenting my own input #1
Comments
I am also getting the same error, can you please help? |
Modified Code for Second ERROR |
I made these changes on the bottom section of the corresponding code cell.... First ERROR as Mentioned by @Rini-Karumanchery is gone.... And also got output.... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I tried to segment my own handwritten image after pre-processsing it. The segmented images were plotted in jupyter notebook, but when I tried to write it into files, I got blank files.
I tried to write the segmented images into files for the inputs you provided and also with inputs from IAM dataset and was able to write it. The code worked perfectly for inputs from IAM dataset. For some inputs which I gave the following errors were obtained:
IndexError Traceback (most recent call last)
in
71 for index, road_blocks in enumerate(road_blocks_cluster_groups):
72 window_image = nmap[:, road_blocks[0]: road_blocks[1]+10]
---> 73 binary_image[cluster_of_interest[0]:cluster_of_interest[len(cluster_of_interest)-1],:][:, road_blocks[0]: road_blocks[1]+10][int(window_image.shape[0]/2),:] *= 0
IndexError: index 0 is out of bounds for axis 0 with size 0
IndexError Traceback (most recent call last)
in
5 path = np.array(astar(nmap, (int(nmap.shape[0]/2), 0), (int(nmap.shape[0]/2),nmap.shape[1]-1)))
6 offset_from_top = cluster_of_interest[0]
----> 7 path[:,0] += offset_from_top
8 line_segments.append(path)
IndexError: too many indices for array
Can you please help
The text was updated successfully, but these errors were encountered: