Optical sensors tend have issues with translucent filaments. (not saying yours does, but you should test it)
You might want to take a leaf out of Prusa's handbook.
Instead of looking at the filament directly, make the filament push a solid ball bearing into the path of the sensor. They use a magnet to pull the ball bearing against the filament