You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice work ! the code works fairly well on my device with my own graph. Just one question, I do not know if it is really an issue or a request, but currently it seems that the object recognition only works with landscape orientation on my device. I would like it to work in portrait upside down mode (or portrait). I checked the code, check that in TensorflowGraph.mm:
orientation parameter is portrait. But then in Tensorflowgraph.mm, there is this part, where I can not find the way the buffer is read for portrait mode:
if (orientation == UIDeviceOrientationLandscapeRight)
{
// landscape right - we start at the end of the buffer and read backwards
srcPixel = srcStartAddress - (srcRow * bytesPerRow) - (srcCol * srcChannels);
}
else
{
// landscape left - we start at the beginning of the buffer and read forward
srcPixel = srcStartAddress + (srcRow * bytesPerRow) + (srcCol * srcChannels);
}
How srcPixel should be set in portrait updsideDown orientation?
Thanks
The text was updated successfully, but these errors were encountered:
Hi John,
I finally got around to fixing the issue with portrait orientations. The main issue was my width and height were flipped when feeding the image data into the Tensorflow graph in portrait orientations. Let me know if this fixes your issue.
Hi,
Nice work ! the code works fairly well on my device with my own graph. Just one question, I do not know if it is really an issue or a request, but currently it seems that the object recognition only works with landscape orientation on my device. I would like it to work in portrait upside down mode (or portrait). I checked the code, check that in TensorflowGraph.mm:
tensorflowGraph?.runModel(on: pixelBuffer, orientation: UIDevice.current.orientation)
orientation parameter is portrait. But then in Tensorflowgraph.mm, there is this part, where I can not find the way the buffer is read for portrait mode:
How srcPixel should be set in portrait updsideDown orientation?
Thanks
The text was updated successfully, but these errors were encountered: