“You have heard that it was said, ‘You shall not commit adultery.’ But I tell you that anyone who looks at a woman lustfully has already committed adultery with her in his heart. Matthew 5: 27-28
Even if no one has noticed you gazing at her... your heart doesn't lie. Be careful guys. Never allow a glance to turn into a gaze.
Jesus clearly teaches us that purity begins in our heart and mind. You can appreciate beauty - just don't idolize it.
When you catch yourself staring - do something radical. Rather than allow your thoughts to be taken hostage by lust, immediately begin praying for God's blessings to be poured out on the person caught in your stare.