carla-simulator/imitation-learning

Changing the ImitationLearning Class for 0.9.x

ameesh-shah opened this issue · 0 comments

Hi,

I'm using Carla 0.9.12, and have trained a CIL model locally that I'd like to use for experiments.
The methods by which sensor data is collected (specifically RGB images) has changed since this codebase was first published, so I was wondering about the following lines specifically, which transform the input RGB image:

rgb_image = rgb_image[self._image_cut[0]:self._image_cut[1], :]

image_input = scipy.misc.imresize(rgb_image, [self._image_size[0],
                                              self._image_size[1]])

image_input = image_input.astype(np.float32)
image_input = np.multiply(image_input, 1.0 / 255.0)

steer, acc, brake = self._control_function(image_input, speed, direction, self._sess)

(This is lines 98-104 in agents/imitation/imitation_learning.py. The permalink is here.)

Are these same transformations necessary in 0.9.x? Where should we mount the RGB camera sensor with respect to the vehicle to make sure that it is the same as the data that this model was trained on? Any advice on porting this to 0.9.12 would be greatly appreciated.