Giter VIP home page Giter VIP logo

hellenicdrones's Introduction

HellenicDrones

Drones Machine Vision Augmentation.

Tutorial for on device Computer Vision inference using yolov8.

📌 Hey, Everything is still under development. 🔨

Installation

Use miniconda 🐍 a free minimal installer for conda (The place where we will create the environment in which the programs will run).

Download the installer here for Windows. 🪟

εικόνα

We will download Python version 3.10 which comes with Conda 23.3.1 Python 3.10.10 released on April 24, 2023. 🐍

After the installation is completed we will search and open Anaconda Prompt which is an "enhanced" windows cmd which automatically includes the conda installation of Python to your PATH environment variable meaning there is no need to set the PYTHONPATH environment variable.

After everything is installed you should see something like this.

εικόνα

💡 If you run into any issues or need more guidance visit here.

⚡ To speed up the process of installing new depedencies we will use Libmamba a faster conda solver which can yield +(50-80)% resolving speeds. Do this by running the following commands on Anaconda Prompt:

conda update -n base conda

and

conda install -n base conda-libmamba-solver
conda config --set solver libmamba

💡For more info here.

Setting up the environment

We need to install the necesary dependencies which are required, to do this we should be Creating a new environment by using the following command:

conda create --name yolov8 python=3.10

We named the new env yolov8 and used python version 3.10. Afterwards we need to activate the new env by

activate yolov8

The (base) on the parathesis should now be changed to your new env name for me yolov8.

εικόνα

📘 We can skip all of the above if we are gonna just use this project and follow the below steps instead on the (base) env. 📢 It is not recomended as package issues might occures if future changes or prototyping happens.

💡 Here is a fast getting started tutorial and a helpful conda cheatsheet.

Installation of the Project

Now let's start with the fun part start by running on the activated conda environment in my case (yolov8):

pip install ultralytics

This gonna a take a while as it is downloading all the necessary packages and their depedencies to train, evaluate, predict and export a yolov8 model. 🔥

📢 This downloads the CPU 💻 version of Pytorch if you have a GPU ⚡ to run the model on you need to go to Pytorch

and install it with the apropriate cuda version by coping the command.

εικόνα

and running it on Anaconda Prompt by putting a --upgrade in front of torch like this:

pip3 install --upgrade torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

To check if everything has gone smoothly type python followed by an import torch followed by a torch.__version__ and torch.cuda_is_available() ( if you have a gpu) finally to exit type exit().

εικόνα

Downloading the pretrained model.

Click this or

Go to https://github.com/nikogarro/HellenicDrones and click on best.pt (this is the default pytorch model) and then download the raw file.

εικόνα

That's it everything is Set up! 📐

Usage

On Anaconda Prompt use the following commands while being on the right env (yolov8) for inference. 🔥

yolo task=detect mode=predict model=path_to_the_downloaded_model show=True source=your_image_or_video_directory line_width=1

💡 For webcam use source=0 and alternative for any other image or video formats including streaming RTSP, RTMP, HTTP and all the acceptable arguments see detailed guide here

📢To stop the real time camera prediction press and hold q.

εικόνα

hellenicdrones's People

Contributors

nikogarro avatar

Watchers

 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.