Metadata-Version: 2.1
Name: answer
Version: 0.1
Summary: UNKNOWN
Home-page: https://github.com/bresan/digipathos_plant_pathology
Author: Rodrigo Bresan
Author-email: 
License: BSD-3-Clause
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown
Requires-Dist: atomicwrites (==1.3.0)
Requires-Dist: attrs (==19.1.0)
Requires-Dist: certifi (==2019.3.9)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: codecov (==2.0.15)
Requires-Dist: coverage (==4.5.3)
Requires-Dist: idna (==2.8)
Requires-Dist: more-itertools (==6.0.0)
Requires-Dist: mypy (==0.670)
Requires-Dist: mypy-extensions (==0.4.1)
Requires-Dist: pluggy (==0.9.0)
Requires-Dist: py (==1.8.0)
Requires-Dist: pytest (==4.3.1)
Requires-Dist: pytest-cov (==2.6.1)
Requires-Dist: requests (==2.21.0)
Requires-Dist: six (==1.12.0)
Requires-Dist: terminaltables (==3.1.0)
Requires-Dist: typed-ast (==1.3.1)
Requires-Dist: urllib3 (==1.24.1)

<img width=75% src="docs/figs/logo.png">

[![PyPI version](https://badge.fury.io/py/digipathos.svg)](https://pypi.org/project/digipathos)
[![Build Status](https://travis-ci.org/bresan/digipathos_plant_pathology.svg?branch=master)](https://travis-ci.org/bresan/digipathos_plant_pathology)
[![codecov](https://codecov.io/gh/bresan/digipathos_plant_pathology/branch/master/graph/badge.svg)](https://codecov.io/gh/bresan/digipathos_plant_pathology)
[![GitHub](https://img.shields.io/github/license/bresan/digipathos_plant_pathology.svg)](https://github.com/bresan/digipathos_plant_pathology/blob/master/LICENSE.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e02bc243822c4ce884c4adf87ff6e9f7)](https://www.codacy.com/app/bresan/digipathos_plant_pathology?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=bresan/digipathos_plant_pathology&amp;utm_campaign=Badge_Grade)

# Overview

This project is aimed to serve as a wrapper for the Digipathos dataset, in order to list and download public data from plant pathologies provided by Embrapa (Brazilian Agricultural Research Corporation).

Example of pictures:

<img width=33% src="docs/figs/fig.png"> <img width=33% src="docs/figs/fig2.png"> <img width=33% src="docs/figs/fig3.png">




# Installation

The installation is pretty simple if you have a virtualenv already installed on your machine. If you don't please rely to [VirtualEnv official documentation](https://virtualenv.pypa.io/en/latest/).

```bash
pip install digipathos
```

# Documentation

Besides the docstrings, major details about the documentation can be found [here](https://digipathos.readthedocs.io/en/latest/).

# Testing

This project is inteded to suit most of the existent needs, so for this reason, testability is a major concern. Most of the code is heavily tested, along with [Travis](https://travis-ci.org/bresan/digipathos_plant_pathology) as Continuous Integration tool to run all the unit tests once there is a new commit.

# Usage

You can use Digipathos in two different ways: via terminal or programatically.

## CLI (Command-Line Interface)

This mode is highly recommended for those who are looking to explore a little bit the dataset. Here you can do the same operations from the programmatic mode, but with the advantage of being able to see all the data that is being retrieved.


```bash
digipathos
```

And then you're gonna be greeted by our dataset browser :-)

<p align="center"><img width=75% src="docs/figs/browser.png"></p>

An example listing all the datasets:

<p align="center"><img width=75% src="docs/figs/datasets.png"></p>


## Programmatically


```python
data_loader = DataLoader()

# list all the datasets
datasets = data_loader.get_datasets()

# now lets give a look at the crops
crops = data_loader.get_crops()

# how about getting all the datasets from a crop?
datasets_from_crop = data_loader.get_datasets_from_crop('Pineapple')

# now let's download a random dataset
dataset_id = random.choice(list(datasets.keys()))
data_loader.download_dataset(dataset_id=dataset_id)

# download all from a given crop
data_loader.download_datasets_from_crop('Pineapple')

# download all the datasets
data_loader.download_all_datasets()
```

Pretty simple, huh?

A working example can be found [here as a Python script](https://github.com/bresan/digipathos_plant_pathology/blob/master/example/example.py).


# Troubleshooting

In case of any issue with the project, or for further questions, do not hesitate to open an issue here on GitHub.

# Contributions

Contributions are really welcome, so feel free to open a pull request :-)


