This is based on a filament sensor design by RaptorFX and a Flashforge tube guide by Mdav801.
RaptorFX - http://www.thingiverse.com/thing:1646220
Mdav801 - http://www.thingiverse.com/thing:1582238
I am still working out some quirks with the design, but all in all it is pretty much functional and meant to be used with the TCST2103 based endstops as seen here: http://www.3dpitstop.com/?post_type=product&p=56
It is meant for use with octoprint in combination with the filament sensor plugin (as mentioned in RaptorFX's description), this currently supports only one sensor. I will either fork the Octoprint Plugin from MoonshineSG or write my own.
Currently i have a microcontroller between the Pi and the 2 Sensors, the controller reads the sensor status every 5 seconds and if one of the sensors is low, it switches the pin that is connected to the Pi and setup in the yaml.conf to low too. You can find basic code for this in the comments.
An infill of ~30% should work fine too.