pytorch/vision

Unit tests for Vision

Open

#110 创建于 2017年3月17日

在 GitHub 查看
 (8 评论) (3 反应) (0 负责人)Python (15,050 star) (6,858 fork)batch import
help wanted

描述

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

贡献者指南