Giter Club home page Giter Club logo

mime's Introduction

Photo by Fatih Kılıç on Unsplash

mime

Here be mimes!

Built with Cookiecutter Django Black code style

What is this?

This is me goofing around and trying to learn some Django the only way there is, (by attempting to build something and combining it with a bunch of other things i know or have come across).

I also don't have a job so need to do something with my life. 😏😏

Environment

This a django based "web app" that uses a Densenet 121 model trained to classify 6 classes of objects.

The classification routes aren't wired up but should be pretty straightfoward to do that. I like swagger UI docs so I have those included as well. The design was done with wp elementor and just dumped the html and wired it up with django views. (pretty "low energy" endeavor).

Classes

  • Potholes
  • Dumping
  • Accidents
  • Flooded
  • Bad drainage
  • Construction

The training code repo can be found in this linked repo. Which also included as a submodule here.

Getting started

Dependencies

  1. Docker and docker compose For windows download docker desktop and that should get sorted out.

Linux

# Download Docker
curl -fsSL get.docker.com -o get-docker.sh
# Install Docker using the stable channel (instead of the default "edge")
CHANNEL=stable sh get-docker.sh
# Remove Docker install script
rm get-docker.sh

# Docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
  1. Clone the repository (if you haven't already)

Using recursive to include the submodule repos in the cloned directory.

git clone --recursive https://github.com/mrdvince/mime
cd mime
  1. Running it Once cloned is done simply use docker to run it and evrything should just work.

The model is included in the ajime submodule, can be retrained or completely swapped out if needed.

# This should get you up and running
docker-compose -f local.yml up -d --build

Settings

Setting Up Your Users

  • To create a normal user account, just go to Sign Up and fill out

  • To create an superuser account, use this command:

    $ python manage.py createsuperuser
    

Type checks

Running type checks with mypy:

$ mypy mime

Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html

Running tests with py.test

$ pytest

Screenshots are nice

Appendix

  1. Using cookie-cutter django was a bit overkill for this.
  2. Shelving this and moving on to other shiny things
  3. Will be trying to write a post about this so check it out mrdvince

mime's People

Contributors

mrdvince avatar dependabot[bot] avatar snyk-bot avatar

Watchers

 avatar  avatar

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.