Giter Site home page Giter Site logo

cowcompliments's Introduction

Cow Compliments

Complimenting cows all over old school runescape with machine learning and python

Installation

  • git clone with submodules:
git clone --recurse-submodules https://github.com/chriskok/SillySoftware.git
  • git add submodules after just cloning:
git clone https://github.com/chriskok/SillySoftware.git
git submodule update --init --recursive

Usage

python cow_compliments.py

Process For Retraining

  1. Use Free Cam (https://www.freescreenrecording.com/) to capture a video of me walking amongst cows
  2. Use VLC to split the photos into pictures of each frame
  3. Use labelImg tool (after pip3 install labelImg) in the directory of the same name to label and create annotations for each image. The command is:
labelimg ..\Videos\Data data\predefined_classes.txt
  1. Download training weights (put in /bin), create /ckpt and create custom cfg file (in /cfg)
  2. Train the darkflow model with new annotations (python test_train.py)
  3. To test prediction:
python darkflow\flow --model cfg/cow_custom_full.cfg --load -1 --demo Videos\CowData.wmv --labels .\classes.txt

TODO

  • Look into preprocessing images and maybe hyperparameter tuning for yolo?

Notes

  • get images to label, inside google_images_download/google_images_download (python google_images_download.py --keywords "osrs cows" --limit 40 --format jpg)
  • To save a video with predicted bounding box, add --saveVideo option.
  • Use different version of ckpt saved models for different accuracy or to avoid overfitting
  • CKPT 750 was loss of around 9, CKPT 1500 was around 2, CKPT 500 could have been like 25
  • Very far from realtime on my Windows Intel i5 Processor, which makes sense (about 3.1 seconds to predict without anything else open)
  • Even slower if free cam is running (3.8 seconds)

cowcompliments's People

Contributors

chriskok avatar

Stargazers

 avatar Benn King avatar Jack  avatar

Watchers

 avatar

Forkers

bennkingy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.