This paper presents a ROS based software framework for kid-size humanoid marathon robot. Marathon track identification was solved by using colour filtering and contour selection approach. Two-stages ConvNet object detection algorithm with colour-based region proposal was proposed to recognize a marker with train accuracy 99.92% and validation accuracy 99.87%. The ConvNet based object detector is run on a mini-computer with Intel Core i3 processor and reached 41.13 FPS processing speed. In order to perform behaviour control, the robot implemented a PID controller for head movement and a proportional controller for line follower behaviour. Finite State Machine is used to control high-level behaviour for performing navigation in the marathon track. The proposed software framework was applied to robot that won the Iran FIRA RoboWorldCup Open 2019 and Taiwan Humanoid 2019 competition.