Skip to content
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
cad18a4
Added Stereo Matching dataset interface and several classic datasets.
TeodorPoncu Jul 10, 2022
df6ec4b
added SceneFlow, FallingThings and CREStereo
TeodorPoncu Jul 11, 2022
d0c5afb
added SceneFlow, FallingThings and CREStereo
TeodorPoncu Jul 11, 2022
a566475
"removed duplicate folder"
TeodorPoncu Jul 11, 2022
8ea74f2
Added InStereo2k. Started working on dataset tests
TeodorPoncu Jul 13, 2022
0959499
"Added calibrartion arg for Middlebury2014 (#6259)"
TeodorPoncu Jul 13, 2022
a9365fe
"Fixed test calibration test Middlebury2014 (#6259)"
TeodorPoncu Jul 13, 2022
96c7bf4
Clean-up. Disp map format to (C, H, W) & valid mask to (H, W). (#6259)
TeodorPoncu Jul 14, 2022
bbb1c56
Ran ufmt. (#6259)
TeodorPoncu Jul 14, 2022
669611e
Adressed CI/CD errors
TeodorPoncu Jul 14, 2022
d9d17a8
Ran formatting pre-commit hook
TeodorPoncu Jul 14, 2022
a31ee83
Added Stereo Matching dataset interface and several classic datasets.
TeodorPoncu Jul 10, 2022
4a5ac89
added SceneFlow, FallingThings and CREStereo
TeodorPoncu Jul 11, 2022
a1fc699
added SceneFlow, FallingThings and CREStereo
TeodorPoncu Jul 11, 2022
62368b1
"removed duplicate folder"
TeodorPoncu Jul 11, 2022
33c52a5
Added InStereo2k. Started working on dataset tests
TeodorPoncu Jul 13, 2022
2deab62
"Added calibrartion arg for Middlebury2014 (#6259)"
TeodorPoncu Jul 13, 2022
cbc55f3
"Fixed test calibration test Middlebury2014 (#6259)"
TeodorPoncu Jul 13, 2022
0759706
Clean-up. Disp map format to (C, H, W) & valid mask to (H, W). (#6259)
TeodorPoncu Jul 14, 2022
de94c2c
Ran ufmt. (#6259)
TeodorPoncu Jul 14, 2022
4256ca4
Adressed CI/CD errors
TeodorPoncu Jul 14, 2022
d7882ca
Ran formatting pre-commit hook
TeodorPoncu Jul 14, 2022
f8d1228
Merge branch 'add-crestereo-dataset' of https://github.com/pytorch/vi…
TeodorPoncu Jul 14, 2022
1436d64
Merge branch 'main' of https://github.com/pytorch/vision into add-cre…
TeodorPoncu Jul 14, 2022
5f291c2
Added reusable _pfm_read. Addressed CI issues.
TeodorPoncu Jul 14, 2022
af6b343
Removed duplicate test code for stereo dataset testcases
TeodorPoncu Jul 14, 2022
67eacf2
Removed string replaces. Moved pattern matching in parent class.
TeodorPoncu Jul 14, 2022
07e0067
Addressed doc comments
TeodorPoncu Jul 14, 2022
ec550e8
Middlebury disparity quickfix
TeodorPoncu Jul 14, 2022
1dd1753
Fixed mypy errors. Addressed download checks.
TeodorPoncu Jul 14, 2022
9f70687
Dataset renaming. Test changes. getitem removed. Warnings removed. Mi…
TeodorPoncu Jul 15, 2022
78f4a52
Forced disparity to be positive
TeodorPoncu Jul 15, 2022
1baaaef
Merge branch 'main' into add-crestereo-dataset
TeodorPoncu Jul 15, 2022
e2ad8d2
Removed implicit mask creation. Added private built_in_mask flag simi…
TeodorPoncu Jul 18, 2022
71343fe
Merge branch 'add-crestereo-dataset' of https://github.com/pytorch/vi…
TeodorPoncu Jul 18, 2022
93f4b6c
Added getiem & docs to inform support multi shape returns
TeodorPoncu Jul 18, 2022
c83bc80
removed path returns from helper test functions
TeodorPoncu Jul 19, 2022
650bf67
replaced os.path.join with pathlib in tests
TeodorPoncu Jul 19, 2022
39efae5
crestereo draft implementation
TeodorPoncu Jul 25, 2022
ce66e4c
Merging from training prototyping
TeodorPoncu Jul 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions test/datasets_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ def test_feature_types(self, config):
@test_all_configs
def test_num_examples(self, config):
with self.create_dataset(config) as (dataset, info):
assert len(dataset) == info["num_examples"]
assert len(dataset) == info["num_examples"], f"The number of examples {len(dataset)} does not match the expected {info['num_examples']}"

@test_all_configs
@ test_all_configs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a few formatting issues like these ones. We try to avoid formatting changes in PRs like these, because they can add noise to git blame

As you can see there are linting issues: https://app.circleci.com/pipelines/github/pytorch/vision/18822/workflows/40d854f9-fd3b-43cb-9471-9eb90d4c93ac/jobs/1522929

We have instructions for applying formatters here: https://github.com/pytorch/vision/blob/main/CONTRIBUTING.md#formatting

def test_transforms(self, config):
mock = unittest.mock.Mock(wraps=lambda *args: args[0] if len(args) == 1 else args)
for kwarg in self._TRANSFORM_KWARGS:
Expand All @@ -587,7 +587,7 @@ class ImageDatasetTestCase(DatasetTestCase):

FEATURE_TYPES = (PIL.Image.Image, int)

@contextlib.contextmanager
@ contextlib.contextmanager
def create_dataset(
self,
config: Optional[Dict[str, Any]] = None,
Expand All @@ -610,7 +610,7 @@ def create_dataset(
with self._force_load_images():
yield dataset, info

@contextlib.contextmanager
@ contextlib.contextmanager
def _force_load_images(self):
open = PIL.Image.open

Expand Down Expand Up @@ -649,7 +649,7 @@ def _set_default_frames_per_clip(self, inject_fake_data):
args_without_default = argspec.args[1 : (-len(argspec.defaults) if argspec.defaults else None)]
frames_per_clip_last = args_without_default[-1] == "frames_per_clip"

@functools.wraps(inject_fake_data)
@ functools.wraps(inject_fake_data)
def wrapper(tmpdir, config):
args = inject_fake_data(tmpdir, config)
if frames_per_clip_last and len(args) == len(args_without_default) - 1:
Expand Down Expand Up @@ -748,7 +748,7 @@ def size(idx: int) -> Tuple[int, int, int]:
]


@requires_lazy_imports("av")
@ requires_lazy_imports("av")
def create_video_file(
root: Union[pathlib.Path, str],
name: Union[pathlib.Path, str],
Expand Down Expand Up @@ -790,7 +790,7 @@ def create_video_file(
return file


@requires_lazy_imports("av")
@ requires_lazy_imports("av")
def create_video_folder(
root: Union[str, pathlib.Path],
name: Union[str, pathlib.Path],
Expand Down
Loading