If they pass within your field of vision, when you weren’t looking for them, there’s not a whole lot you can do. Even if you admire their beauty when this happens, no sin there.
If you’re a bikini fashion designer and you are evaluating color, materials, and the style, you’re a working professional. No sin there, either.
If you allow your eyes to linger longer than necessary in the two previous cases, you’re asking for trouble.
If you start undressing them in your mind and entertaining related fantasies, you’re definitely in the sin zone.
If you know you have a weakness here, but carelessly or purposefully go to places where you know you’ll be exposed (for lack of better word) to this, you are placing yourself in a near or proximate occasion of sin, which is at least venially sinful, since it could lead you to more serious sin.
Hope that helps.