Driverless cars might not be able to detect pedestrians depending on what clothing they are wearing, an AI expert has warned.