Week 3 - Amansangram/darknet_aman GitHub Wiki

Week-3 (01/06/2020 – 07/06/2020)

Tuesday (02/06/2020)

  • Trained the YOLO using the new data. The final avg loss was 0.7 after which it stayed constant for one hour, so I stopped the training. The new wights are working better with threshold of 0.4
  • Now the main task is to see which topics I need to subscribe in the lane following to control the speed accordingly.
  • The topic that I need are:
  1. found_object
  2. boundingboxes

Wednesday (03/06/2020)

  • Subscribe to both the topic in the lane following.
  • Count subscriber

self.image_darknet_count = rospy.Subscriber('/darknet_ros/found_object', ObjectCount, self.count_callback)

  • bounding_boxes subscriber

self.bounding_boxes = rospy.Subscriber('/darknet_ros/bounding_boxes', BoundingBoxes, self.bb_callback)

  • 'found_object' topic had the message 'count' which gives the number of objects being detected in the YOLO darknet node. Using this I was able to stop the duckie. Made 'v' zero and tested it. The linear velocity became zero but, but angular velocity was not zero and I was unable to make 'y' and 'phi' zero. So, the duckie stops but keeps spinning on the same spot.
  • For that I used count as, if count > 0 then making cmd_vel zero through cmd_vel.linear.x = 0 & cmd_vel.angular.z = 0
  • This was working just fine. After that I tried using 'bounding_boxes' which publishes a message BoundingBox which has Class. Class is a string type and tells the class of the object that is being detected.
  • Using this I can stop the duckie and also change its speed.
  • The message BoundingBox seems like an array and I am unable to get CLass saperately from it. Many different methods were tried but all failed.
  • Got mats and holders from Brenton for making the duckietown.

Saturday (05/06/2020)

  • Still trying to make the BoundingBox message work.
  • Meanwhile decided to make the duckietown,using the mats and wooden holders.
  • Tried to alter the speed using count only. For that I first declared 'v' as a global variable and then changed its value by calling the 'global v'.
  • This worked and the speed was changing, but it was useless until Class message is integrated with it.

Sunday (06/06/2020)

  • New methods were tried but still the issue was not solved.
  • Finally decided to do train the YOLO last time to achieve the 75% mile stone, i.e. to make the machine learning code robust. For that new data was created with more than 100 images of each class from different angles.
  • Training was done using github this time as the issue was resolved. This time the training ran for about 2 hours for about 84000 images, and the avg loss obtained was about 0.1
  • The resulting weights were working amazingly. Giving 100% accuracy for STOP and 99% for 20Km/h and 60Km/h.