1 minute read

This past two weeks we had to focus on two main tasks:

  • To further understand and add our own deep learning models on the BehaviourMetrics project
  • To learn and if possible implement more metrics on Carla for BehaviourMetrics

The first task was supposed to be an easy one but it turned out to be quite the hassle. It wasn’t so much the difficulty of the task itself but rather my own error for not noticing certain general aspects of the project. The main problem was that the environment in which the BehaviourMetrics was being launched was different from the one we had for training and testing the deep learning models. In doing so, the input images were not being correctly handled as they were on the 22.04 OS machine. Our model was trained using images shaped as (200, 66, 4), having the usual RGB 3 channels plus a fourth channel for the previous speed as explained in the week 27 post. The thing was that by we need to have images of shape (66, 200, 4) as input instead of the expected (200, 66, 4) but in doing so we get the obvious error that the input shape of the image is not the same as the expected, but this was working fine on our machine. Why?

Knowing that the OpenCV library has a different way of showing the order of the RGB arrays we thought that this could be one posible reason. To try to fix this, the idea was to test the output values on a single image on the two environments. And as we thought, our main machine was giving us the expected values on the image shaped (66, 200, 4) instead of the (200, 66, 4) one. But on the other machine, we had to solve the error if we wanted the same outputs. Finally, the problem was behind the Tensorflow library that wasn’t installed, instead it was installed the tensorflow-gpu which for some reason didn’t let us put the input image. Once this was installed, the problem was no more!

We still had to strugle in order to make our model work but the problem was that we ignored the cropping steps of the input images. Such a silly mistake was the responsible of the weird behaviour on our model.