Use a Stedham Electronics capacitive sensor
to detect the bottle. It doesn't matter what color the bottle is...it can even be clear. It doesn't matter if the bottle is glass or plastic. Use a shielded sensor, placed above, below or to the side.
The sensor on the bottom is a FlatPack
sensor, but any shielded sensor (C1xxxxxx-x) will do it. This sensor is detecting the bottle.
This clever plant engineer is also concerned with contaminants, such as curious cartoon characters, falling in the bottles. He set up another capacitive sensor to ignore the bottle alone, but if something is in there the sensor will detect it.