Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

A collection of requests for the communication with different computer vision APIs (plant.id, PlantNet, iNaturalist, NIA).

License

Notifications You must be signed in to change notification settings

reproducible-agile/RequestCollectionComputerVisionAPIs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RequestCollectionComputerVisionAPIs

A collection of requests for the communication with different computer vision APIs (Plant.id, Pl@ntNet, iNaturalist, NIA).

Introduction

This script was developed in the context of the project “CS data supporting IAS policy in Europe” caried out by the JRC. It aims at consolidating the framework for CS IAS data in Europe. Towards this objective the aim is inter alia to explore automatized solutions for validation of IAS records in support of citizen science. This entails the identification, testing and provision of species recognition models to support the validation of IAS in Europe. The outmost goal is to improve the current data validation process of the JRC app through automation.

This script is used to send request to four different computer vision APIs and store the results in a .csv file. The APIs that can be accessed are:

  • Plant.id: Plant.id is a project developed by the team of the FlowerChecker company, whereby the main goal is to facilitate the monitoring of invasive and endangered species for a wide range of usage scenarios from business to private use.
  • Pl@ntNet: The Pl@ntNet project, implemented by a consortium including CIRAD, INRA, INRIA, IRD and the Agropolis Foundation, is a tool which supports the image-based identification of plants (https://identify.plantnet.org/) for both, amateurs and professional.
  • iNaturalist: The iNaturalist API is developed by iNaturalist, a joint initiative by the California Academy of Science and the National Geographic Society. It is able to identify plant and animal species.
  • NIA: The Nature Identification API, is a joint effort by Observation International, Naturalis and Intel Corp. It is able to identify plant and animal species.

Installation

1. Clone the repo

git clone https://github.com/EibSReM/RequestCollectionComputerVisionAPIs.git
cd ReqRequestCollectionComputerVisionAPIs

2. Installtion of packages

You can either install python and all packages directly on your or machine or you can use virtual environments like conda.

a) Plain installation

  1. Install Python

  2. Install Jupyter notebook (more info at https://jupyter.org/install.html) and needed Packages

pip install notebook
pip install requests

b) Using Conda

conda env create -f environment.yml
conda activate RequestCollectionComputerVisionAPIs

3. Start the jupyter notebook

jupyter notebook apiRequests.ipynb

Usage

  • Create folder containing all images to test
  • run all code chunks including the last one. The last one will perform the analysis. You will asked to enter different details:
    • Path to the directory where the test images are in
    • the filename in which the results will be saved, if it not exists it will be created
    • The API, which should be used (one of "plantNet","iNaturalist", "plantID", "NIA")
    • User credentials (see User credentials)
      • For NIA:
        • E-Mail
        • Password
      • For the other APIs:
        • Access token
  • The result file will have following result:
    • fileName of image, first prediction, score of first prediction, second prediction, score of second prediction, ...

User Credentials

For all APIs you need to provide user credentials. How you can get these is described below:

Number of Requests

The amount of requests needed depends on the number of images to be tested. For each image one request is needed. In our research we tested the APIs with 6 images of by the API covered Invasive Alien Species of union concern. Which results in different test sizes.

  • INaturalist API: 432
  • NIA: 294
  • Pl@ntNet API: 180
  • PlantID: 186

Execution Time

The execution time strongly depends on the internet connection and the response time of the APIs, which often vary. As an example: To query 150 images with Pl@ntNet took 8:13 minutes, with the CPU time being 1:43 minutes.

About

A collection of requests for the communication with different computer vision APIs (plant.id, PlantNet, iNaturalist, NIA).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%