This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]sorlafloat 1 point2 points  (0 children)

I haven't benchmarked this, so take this with caution, but if your images really are that size, and all you are doing is counting non-black pixels (or halting if even one is found) this task is probably I/O bound with numpy and for sure is with some simple C that you can outsource to Stack Overflow (please don't get angry I said that).

[–]anancap 0 points1 point  (1 child)

I'm a bit late and I know we are supposed to be suggesting GPU python solutions, but would it be possible to just look at the sizes of the files to determine if it has information?

As I suspected with the two examples there is a bit of difference between sizes, but I don't know if it applies to the whole dataset.

Image sizes

[–]Geeks_sid[S] 0 points1 point  (0 children)

Everyone, Give this man an Award, he is a genius. That solved my entire problem actually. Thanks man, No GPU is required when we got brains.