Skip to content

ValueError: Expected boxes to be a Tensor with a final dimension of 4 #1748

Answered by gH2AX
gH2AX asked this question in Q&A
Discussion options

You must be logged in to vote

I think I found the solution!

So, I didn't understand that the inputs need to be strictly formatted as a Tensorflow dataset in a specific way (did I mention that I'm a beginner?). The issue was that in the tutorial you first apply a bunch of confusing transformations on the pascalvoc dataset, but I had my own data, and I tried to filter out only the information which would've been relevant to my case. And since visualizations from the luketils toolkit rendered correctly, I though I was on the right track. So here's my solution to all the newbies out there:

Let's say you have the following data at hand:

  • Images: A np.ndarray of shape (NUM_SAMPLES, HEIGHT, WIDTH, CHANNELS)
  • Box_Coordinates: …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jbischof
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jbischof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants