mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-21 23:00:34 +08:00
Extract finding directories for test data
Summary: Make common functions for finding directories where test data is found, instead of lots of tests using their own `__file__` while trying to get ./tests/data and the tutorials data. Reviewed By: nikhilaravi Differential Revision: D27633701 fbshipit-source-id: 1467bb6018cea16eba3cab097d713116d51071e9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
24ee279005
commit
1216b5765a
@@ -2,10 +2,10 @@
|
||||
|
||||
|
||||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
import numpy as np
|
||||
import torch
|
||||
from common_testing import get_tests_dir
|
||||
from PIL import Image
|
||||
from pytorch3d.renderer.cameras import FoVPerspectiveCameras, look_at_view_transform
|
||||
from pytorch3d.renderer.mesh.rasterizer import MeshRasterizer, RasterizationSettings
|
||||
@@ -17,7 +17,7 @@ from pytorch3d.structures import Pointclouds
|
||||
from pytorch3d.utils.ico_sphere import ico_sphere
|
||||
|
||||
|
||||
DATA_DIR = Path(__file__).resolve().parent / "data"
|
||||
DATA_DIR = get_tests_dir() / "data"
|
||||
DEBUG = False # Set DEBUG to true to save outputs from the tests.
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user