pytorch/vision

Unit tests for Vision

Open

#110 aberto em 17 de mar. de 2017

Ver no GitHub
 (8 comments) (3 reactions) (0 assignees)Python (6.858 forks)batch import
help wanted

Métricas do repositório

Stars
 (15.050 stars)
Métricas de merge de PR
 (Mesclagem média 12d 8h) (14 fundiu PRs em 30d)

Description

This issue fleshes out the full details and scope of the unit tests needed for torchvision.

There are very limited unit tests under test/ which dont cover the transform outputs themselves, but are limited to dimension and shape checks.

First, let's start with quantitative tests on known results.

We need to have a set of 10 test images, and then do each transformation of vision.transforms on these 10 images, and compare them pixel-wise with known results. We then compare the known results with the computed result from the transforms, and if they are within some threshold, we pass the test.

Some of the transforms such as Horizontal / Vertical flip can also have exact numerical unit-tests.

The test images:

  • 2 monochrome images
  • 2 3-channel images
  • 2 4-channel PNG images with an Alpha component

Can find some on Wikipedia that are freely licensed.

The tests need to cover all transforms under: https://github.com/pytorch/vision#transforms

For similar testing, you can have a look at:

https://github.com/torch/image/blob/master/test/test.lua#L258-L646

Guia do colaborador