{"id":17011988,"url":"https://github.com/renatogeh/godrive","last_synced_at":"2026-05-14T23:12:50.403Z","repository":{"id":57567547,"uuid":"143584901","full_name":"RenatoGeh/godrive","owner":"RenatoGeh","description":"GoDrive is an application of autonomous driving through image classification using sum-product networks.","archived":false,"fork":false,"pushed_at":"2019-03-11T01:59:44.000Z","size":26,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T13:43:53.179Z","etag":null,"topics":["autonomous-driving","gospn","image-classification","mobile-robots","probabilistic-graphical-models","spn","sum-product-networks"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RenatoGeh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-05T05:05:23.000Z","updated_at":"2023-01-21T13:24:47.000Z","dependencies_parsed_at":"2022-09-15T05:00:50.613Z","dependency_job_id":null,"html_url":"https://github.com/RenatoGeh/godrive","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RenatoGeh/godrive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenatoGeh%2Fgodrive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenatoGeh%2Fgodrive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenatoGeh%2Fgodrive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenatoGeh%2Fgodrive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RenatoGeh","download_url":"https://codeload.github.com/RenatoGeh/godrive/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RenatoGeh%2Fgodrive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278707989,"owners_count":26031932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-driving","gospn","image-classification","mobile-robots","probabilistic-graphical-models","spn","sum-product-networks"],"created_at":"2024-10-14T06:09:07.573Z","updated_at":"2025-10-07T01:25:06.919Z","avatar_url":"https://github.com/RenatoGeh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"GoDrive\n=======\n\n### Description\n\nGoDrive is a lane following autonomous driving robot implementation\nthat uses image classification as a form of imitation learning.\n[sum-product networks](http://spn.cs.washington.edu) (SPNs) are used as\na way to compute exact inference in linear time, allowing for accurate\nand fast uncertainty measuring in real-time.\n\nThis code is part of my undergraduate thesis [Mobile Robot Self-Driving\nThrough Image Classification Using Discriminative Learning of\nSum-Product\nNetworks](https://www.ime.usp.br/~renatolg/mac0499/?lang=en).  The full\nfinal thesis can be read\n[here](https://www.ime.usp.br/~renatolg/mac0499/docs/thesis.pdf). Both\nprediction and training of SPNs are done through the\n[GoSPN](https://github.com/RenatoGeh/gospn) library.\n\n### Objectives\n\nThe primary objectives of this implementation are twofold: both as a\ncomparative study on different SPN architectures and learning methods,\nand also as a preliminar work on SPNs for self-driving and their\nfeasibility as a real-time prediction model. A third secondary objective\nwas to compare SPNs with state-of-the-art multilayer perceptrons (MLPs)\nand convolutional neural-networks (CNNs).\n\n### Lane following as self-driving\n\nOurs is a primitive approach to self-driving, mainly that of lane\nfollowing through imitation learning. The robot's objective is to remain\ninside a designated lane whilst still moving forward. Since the robot is\nnot allowed to stop, constantly moving forward, the prediction model\nmust be both accurate - identifying lane markings and making the\nnecessary heading corrections - and fast.\n\nThe robot was allowed to execute three different operations: go forward,\nturn left, or turn right. Prediction output encoded these three commands\nas a single byte.\n\n### Hardware\n\nWe experimented with the Lego Mindstorm NXT, nicknamed Brick. A\nRaspberry Pi Model 3, nicknamed Berry, was attached to the bot, together\nwith a low cost webcam. The Berry was then used for image capturing,\nprocessing, and label prediction, sending the predicted label to the\nBrick, who was only tasked with executing corresponding motor commands.\n\n### Prediction\n\nPrediction was done in real-time. The implementation contained in this\nrepository takes advantage of the Berry's four CPU cores. Three cores\nare dedicated to computing each label concurrently. The fourth core is\nused for image capturing, processing and sending the predicted byte to\nthe Brick.\n\n### Training\n\nTraining was done separately on a desktop computer. You can read more\nabout training and validation\n[here](https://www.ime.usp.br/~renatolg/mac0499/docs/thesis.pdf)\n\n### Results\n\nResults are available both in the\n[thesis](https://www.ime.usp.br/~renatolg/mac0499/docs/thesis.pdf) and\nalso in [video](https://www.ime.usp.br/~renatolg/mac0499/video.html?lang=en).\n\n### Code structure\n\nThe code is structured as follows:\n\n- `root`:\n    * `contest.go`: connection test for testing if the bot is visible\n    * `main.go`: main file for executing training or self-driving\n- `bot`:\n    * `bot.go`: bot loop, communication, prediction and image processing\n    * `usb.go`: USB communication handling from Berry to Brick\n- `camera`:\n    * `writer.go`: writer inferface for recording camera feed\n    * `camera.go`: camera processing and capturing\n    * `trans.go`: image transformations\n- `data`:\n    * `data.go`: pulling data from dataset\n- `models`:\n    * `model.go`: interface for prediction models\n    * `accuracy.go`: validation code for accuracy measuring\n    * `dennis.go`: Dennis-Ventura architecture inference, learning and serialization\n    * `gens.go`: Gens-Domingos architecture inference, learning and serialization\n- `java`:\n    * `Remote.java`: Brick-side code for interpreting messages as motor power\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatogeh%2Fgodrive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenatogeh%2Fgodrive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenatogeh%2Fgodrive/lists"}