davidtvs / PyTorch-ENet

PyTorch implementation of ENet
MIT License
383 stars 129 forks source link

Change confusion matrix dtype #46

Closed JOBR0 closed 3 years ago

JOBR0 commented 3 years ago

The accumulation of the confusion matrix produces overflows if you have a large data set. Matrix is currently stored as int32. If you have a dataset with 10^5 images and 10^5 pixels per image (480*360=172800) the maximum true positive number is 10^10 > 2^32 ~ 10^9. Changed the dtype of the matrix to int64 to solve the problem.

JOBR0 commented 3 years ago

I changed it to x.astype(np.int64)

davidtvs commented 3 years ago

Merged, thanks for the PR!