{"id":16135577,"url":"https://github.com/mayukhdeb/deep-chicken-terminator","last_synced_at":"2025-03-18T15:31:24.833Z","repository":{"id":112695595,"uuid":"244150801","full_name":"Mayukhdeb/deep-chicken-terminator","owner":"Mayukhdeb","description":"tracking wildlife in minecraft using deep learning  :hocho: :chicken:","archived":false,"fork":false,"pushed_at":"2020-04-10T05:27:06.000Z","size":18734,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:34:00.685Z","etag":null,"topics":["computer-vision","data-augmentation","deep-learning","heatmaps","minecraft","object-detection","object-tracking","opencv","pyautogui","pytorch"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mayukhdeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-01T13:06:09.000Z","updated_at":"2024-05-20T07:06:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"39a9791f-9084-4994-b746-a8cf69c742be","html_url":"https://github.com/Mayukhdeb/deep-chicken-terminator","commit_stats":{"total_commits":35,"total_committers":3,"mean_commits":"11.666666666666666","dds":0.2857142857142857,"last_synced_commit":"af518ede0e9ff1befc3127193814340f84323894"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayukhdeb%2Fdeep-chicken-terminator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayukhdeb%2Fdeep-chicken-terminator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayukhdeb%2Fdeep-chicken-terminator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayukhdeb%2Fdeep-chicken-terminator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mayukhdeb","download_url":"https://codeload.github.com/Mayukhdeb/deep-chicken-terminator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243936375,"owners_count":20371504,"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","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":["computer-vision","data-augmentation","deep-learning","heatmaps","minecraft","object-detection","object-tracking","opencv","pyautogui","pytorch"],"created_at":"2024-10-09T23:08:36.182Z","updated_at":"2025-03-18T15:31:24.828Z","avatar_url":"https://github.com/Mayukhdeb.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deep-chicken-terminator\ndeep learning to track (and possibly kill)  chickens in minecraft :hocho: :chicken:\n\n[![Binder](https://camo.githubusercontent.com/bfeb5472ee3df9b7c63ea3b260dc0c679be90b97/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72656e6465722d6e627669657765722d6f72616e67652e7376673f636f6c6f72423d66333736323626636f6c6f72413d346434643464)](https://nbviewer.jupyter.org/github/Mayukhdeb/deep-chicken-terminator/tree/master/)\n\n\u003cimg src=\"sample_images/chicken_genocide.gif\" width=\"120%\"\u003e.\n\n\n\n\n## Step 1 - collecting training data for the deep neural network \n\n\u003cimg src=\"sample_images/training_data_samples.png\" width=\"120%\"\u003e.\n\n* This was mostly just me taking cropped screenshots of animals while playing the game, took about 40 screenshots of each animal.\n* The 20 screenshots of each animal were then augmented and got 500 samples of each. \n* The dataset is very small, but it works anyways for now\n\n## Step 2 - training a deep learning model on the samples\n\n\u003cimg src=\"sample_images/training_curve.png\" width=\"30%\"\u003e.\n\n* The architecture was kept intentionally small so that it keeps a good response time on the live feed\n* The dataset had only 2000 images sized at 50*50, so training barely took any time \n\n## Step 3 - Collecting more training data with the trained model\n\n\u003cimg src=\"sample_images/hunter_alpha.gif\" width=\"60%\"\u003e.\n\n* this is done by saving the frames which give a probaility of over 99% on the pre trained model\n* these saved images are again used for further training, which means `hunter()` is getting better and better.\n\n## Step 4 - detecting a and tracking chicken (or any animal for that matter) with the mouse using the trained model\n\n\u003cimg src=\"sample_images/mouse_automation.gif\" width=\"120%\"\u003e.\n\n\n\u003cimg src=\"sample_images/pre_barbecue.png\" width=\"60%\"\u003e.\n\n* This was done using a custom ```detect_animal_numpy()``` function which iterates through the image with a certain kernel size and a stride size, and feeds each sample to the trained NN (nicknamed hunter)\n* A heatmap is then generated from the output of the NN which gives us a probability distribution over the image of a certain animal ( chicken, pig, or panda)\n* why use heatmaps instead of rectangles ? because they look cooler.\n\n\u003cimg src=\"sample_images/barbecue.png\" width=\"60%\"\u003e.\n\n## Step 5 (and probably the final step) - Train `hunter()` to detect fellow villagers and wipe out whole villages\n\n* Chickens are just an excuse, it can be easily modified to shoot arrows on anything that moves.\n* This is yet to be done.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayukhdeb%2Fdeep-chicken-terminator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayukhdeb%2Fdeep-chicken-terminator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayukhdeb%2Fdeep-chicken-terminator/lists"}