Road detection is essential for autonomous driving and road maintenance. However, the complexity of Deep Neural Networks (DNN) used for this task poses challenges for resource-constrained platforms like edge TPUs. To address this, we propose a pruning-based optimization technique in TensorFlow. Pruning selectively removes unnecessary parameters from the network, reducing its size without compromising accuracy. In our experiment, We asses the effect of pruning on road detection performance by utilizing the Fast R-CNN MobileNet V2 model. The results show that pruning significantly reduces parameters without sacrificing accuracy. We observed that the pruning-based optimization technique not only reduces the parameters of the network but also minimizes loss values. This indicates that the pruned model is able to maintain a high level of accuracy while producing more efficient representations of the road features. By reducing loss values, the pruned model demonstrates improved robustness and precision in detecting road conditions.