VikParuchuri / marker

Convert PDF to markdown quickly with high accuracy
https://www.datalab.to
GNU General Public License v3.0
16.72k stars 947 forks source link

Report an error: RuntimeWarning: invalid value encountered in cast aff_img = Image.fromarray((affinity_map * 255).astype(np.uint8)) #287

Open potatoo0000 opened 1 week ago

potatoo0000 commented 1 week ago

I encountered the following problem when processing the same PDF at different times: RuntimeWarning: invalid value encountered in cast heat_img = Image.fromarray((heatmap * 255).astype(np.uint8)), this is the problem encountered when re-converting the same PDF today, the document can be converted normally, but it seems that the function of deleting the header and footer has disappeared. What's going on here?

potatoo0000 commented 1 week ago

Now it is found that maybe there is a problem in the part of processing images = =

woyoudianshenxu commented 1 day ago

I found the same problem, not being able to process images accurately. Have you found the solution?

potatoo0000 commented 1 day ago

I found the same problem, not being able to process images accurately. Have you found the solution?

Hello, I have bypassed this problem for the time being, I guess there may be a problem with calling torch.16 using GPU in win11 system, but I am not sure if this guess is correct, you can use the next cpu version of torch, the problem can be solved

woyoudianshenxu commented 1 day ago

I found the same problem, not being able to process images accurately. Have you found the solution?

Hello, I have bypassed this problem for the time being, I guess there may be a problem with calling torch.16 using GPU in win11 system, but I am not sure if this guess is correct, you can use the next cpu version of torch, the problem can be solved

OK.This problem also exists in win10. I changed the torch version and it still doesn't work. I try the cpu version. Ty