bigmlcom / sensenet

0 stars 8 forks source link

Slight sizing error #26

Closed charleslparker closed 2 years ago

charleslparker commented 2 years ago

For some combinations of input size / image size, there was a bug causing the resized image to be off by one pixel, which was causing the concatenation errors in the Yolov4 predictions spotted by @unmonoqueteclea. I'm kind of shocked that this hasn't surfaced until now, and it's possible that this has impacted predictions using the tinyyolo models as well, though it seems like the impact of an extra row or column in the input image should be small.

unmonoqueteclea commented 2 years ago

@charleslparker As I think you will update Pyramid to use the new version of Sensenet, I would need you to include there (and in shapsplain) the trick you added in the setup.py file to avoid installing tensorflow if tensorflow-gpu is installed. Could that be possible? Thanks

charleslparker commented 2 years ago

One question, just in case. Was this bug affecting Pyramid training process or just Sensenet scoring?

I think just scoring; images for learning are scaled to the correct resolution in a preprocessing step so we don't waste computation doing it over and over, and that code is different from the scaling code at prediction time. If I was making the same mistake during learning, there should be been a dimension mismatch somewhere along the way.

I would need you to include there (and in shapsplain) the trick you added in the setup.py file to avoid installing tensorflow if tensorflow-gpu is installed. Could that be possible?

In shapsplain I can do it with no problem. In pyramid, it's a bit scary as I believe @petersen-poul has code that hand-parses install_requires and takes some action based on that, so I don't think I'm allowed to mess with it.

It's ugly, but we could maintain a separate branch with the trick in it.

unmonoqueteclea commented 2 years ago

@charleslparker , no problem with Pyramid. I just remembered that I maintain my own fork of Pyramid specifically for that project (adding a LICENSE file, and that trick in the setup.py) So, I think I just need it in shapsplain