Git Product home page Git Product logo

multispectral-pineapple-detection's Introduction

Fruit Counting:

Counting pineapples using Deep Learning with multispectral images.

This is a customized version of EfficientDet for our research about the importance multispectral images when dealing with object detection (EfficientDet paper: https://arxiv.org/abs/1911.09070). This package builds on top of this excellent EfficientDet PyTorch implementation. Also it encompases a strong pipeline to pre-process the multispectral images taken from a Unmanned Aerial Vehicle (UAV) model DJI P4 Multispectral. This pre-processing pipline follows the image processing guide: https://dl.djicdn.com/downloads/p4-multispectral/20200717/P4_Multispectral_Image_Processing_Guide_EN.pdf.

Requirements:

  1. The total number of images in the dataset should not be larger than 10K, capacity should be under 5GB, and it should be free to download, i.e. baiduyun.
  2. The dataset should be in the format of this repo.

Install requirements (Python version 3.8).

pip install -U scikit-learn
pip install pycocotools numpy opencv-contrib-python tqdm tensorboard tensorboardX pyyaml webcolors
pip install torch==1.4.0
pip install torchvision==0.5.0
pip install rasterio

Data pre-processing

Normally, DJI P4 Multispectral stores images in the following way:

    DJI_0010.JPG
    DJI_0011.TIF
    DJI_0012.TIF
    DJI_0013.TIF
    DJI_0014.TIF
    DJI_0015.TIF
    DJI_0016.JPG
    ...

The .JPG file represents de visible light image, and the other 5 .TIF files represent the multispectral bands of that specific capture. This pattern must be present in all datasets to pre-process since the script will look for the 6 images (visible-light, Red, Blue, Green, RedEdge, and NIR).
The following line represents how the python file must be called to align all the images and apply all the photosensitivity between the multispectral images and sunlight sensor.

    # The param named start_numbering means the new unique number name that the image will have.  
    # This is important because DJI images name can be duplicated between directories from the same flight.
    python pre-processing/homography_align_ORB.py --dir_path /path/to/the/directory/where/your/images/are/located --results_dir_path /path/to/the/directory/where/the/aligned/images/will/be/located/ --start_numbering 1

After running the pre-processing step the multispectral images will look like this:

    00000001.JPG
    00000001.TIF
    00000002.JPG
    00000002.TIF
    ...

The ".TIF" file contains the 5 multispectral bands aligned in the following way: 1:Red, 2:Blue, 3:Green, 4:RedEdge, 5:NIR.
The ".JPG" file corresponds to the original visible light image.

multispectral-pineapple-detection's People

Contributors

manfredgonzalez 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.