The study introduces a stable walking pattern for a biped robot by employing a semi-supervised artificial neural network (ANN) to generate trajectories with a focus on reducing potential damage from small objects that are identified by Yolov5 algorithm. The ANN is utilized as a universal approximator to ensure smooth motion automatically by meeting predefined boundary conditions during its training. This trajectory generation approach is then compared with one another ANN- based method, with nonstop evaluations mainly focusing on position, velocity, and its acceleration profiles to maintain smooth motion. By analysis of trajectory derivatives and its curvature detects and auto corrects any discontinuities. Mathematical model created on from MATLAB 2023 and its simulations validate the trajectory's smoothness and demonstrating its effectiveness in enabling bipedal robots to navigate uneven terrain. The proposed method is very useful and more suitable for online adaptable trajectory generation by addressing collision avoidance and adaptability to various terrains, and overall stability in bipedal robot navigation comprehensively.