A computer-implemented method for perceiving obstacles of autonomous driving, the method comprising: generating a two-dimensional, 2D, segmentation image of a three-dimensional, 3D, scene comprising one or more objects by rendering the 3D scene with a segmentation camera, wherein each of the objects is rendered in a single respective different color; identifying one or more visible objects in the 3D scene among the one or more objects based on the segmentation image; generating a 2D amodal segmentation image for each of the visible objects in the 3D scene separately, wherein each amodal segmentation image comprises only the single visible object for which it is generated; and generating a 2D bounding box for each of the visible objects in the 3D scene based on the amodal segmentation image for the visible object, the method characterised in that identifying the one or more visible objects in the 3D scene based on the segmentation image further comprises: determining a quantity of visible pixels for each of the objects in the 3D scene, wherein all pixels present in the segmentation image associated with an object are visible pixels, and wherein a correspondence between a pixel and its associated object is identified based on a color of the pixel and the single color of the associated object; determining, for each of the objects, whether a quantity of visible pixels associated with the object is greater than a predetermined threshold; and identifying an object in the 3D scene as a visible object in response to determining that the quantity of visible pixels associated with the object is greater than the predetermined threshold. generating a two-dimensional, 2D, segmentation image of a three-dimensional, 3D, scene comprising one or more objects by rendering the 3D scene with a segmentation camera, wherein each of the objects is rendered in a single respective different color; identifying one or more visible objects in the 3D scene among the one or more objects based on the segmentation image; generating a 2D amodal segmentation image for each of the visible objects in the 3D scene separately, wherein each amodal segmentation image comprises only the single visible object for which it is generated; and generating a 2D bounding box for each of the visible objects in the 3D scene based on the amodal segmentation image for the visible object, the method characterised in that identifying the one or more visible objects in the 3D scene based on the segmentation image further comprises: determining a quantity of visible pixels for each of the objects in the 3D scene, wherein all pixels present in the segmentation image associated with an object are visible pixels, and wherein a correspondence between a pixel and its associated object is identified based on a color of the pixel and the single color of the associated object; determining, for each of the objects, whether a quantity of visible pixels associated with the object is greater than a predetermined threshold; and identifying an object in the 3D scene as a visible object in response to determining that the quantity of visible pixels associated with the object is greater than the predetermined threshold. determining a quantity of visible pixels for each of the objects in the 3D scene, wherein all pixels present in the segmentation image associated with an object are visible pixels, and wherein a correspondence between a pixel and its associated object is identified based on a color of the pixel and the single color of the associated object; determining, for each of the objects, whether a quantity of visible pixels associated with the object is greater than a predetermined threshold; and identifying an object in the 3D scene as a visible object in response to determining that the quantity of visible pixels associated with the object is greater than the predetermined threshold.