Skip to content

Commit

Permalink
chore(pylint): Some pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerfarmer committed Aug 22, 2023
1 parent 2f927e7 commit c01949a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions blenderproc/python/writer/BopWriterUtility.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@


def write_bop(output_dir: str, target_objects: Optional[List[MeshObject]] = None,
depths: Optional[List[np.ndarray]] = None, colors: Optional[List[np.ndarray]] = None,
depths: List[np.ndarray] = None, colors: List[np.ndarray] = None,
color_file_format: str = "PNG", dataset: str = "", append_to_existing_output: bool = True,
depth_scale: float = 1.0, jpg_quality: int = 95, save_world2cam: bool = True,
ignore_dist_thres: float = 100., m2mm: Optional[bool] = None, annotation_unit: str = 'mm',
Expand Down Expand Up @@ -56,10 +56,6 @@ def write_bop(output_dir: str, target_objects: Optional[List[MeshObject]] = None
:param calc_mask_info_coco: Whether to calculate gt masks, gt info and gt coco annotations.
:param delta: Tolerance used for estimation of the visibility masks (in [m]).
"""
if depths is None:
depths = []
if colors is None:
colors = []

# Output paths.
dataset_dir = os.path.join(output_dir, dataset)
Expand Down Expand Up @@ -375,8 +371,8 @@ def get_frame_camera(save_world2cam: bool, depth_scale: float = 1.0, unit_scalin
return frame_camera_dict

@staticmethod
def write_frames(chunks_dir: str, dataset_objects: list, depths: Optional[List[np.ndarray]] = None,
colors: Optional[List[np.ndarray]] = None, color_file_format: str = "PNG",
def write_frames(chunks_dir: str, dataset_objects: list, depths: List[np.ndarray],
colors: List[np.ndarray], color_file_format: str = "PNG",
depth_scale: float = 1.0, frames_per_chunk: int = 1000, annotation_scale: float = 1000.,
ignore_dist_thres: float = 100., save_world2cam: bool = True, jpg_quality: int = 95):
"""Write each frame's ground truth into chunk directory in BOP format
Expand All @@ -396,10 +392,6 @@ def write_frames(chunks_dir: str, dataset_objects: list, depths: Optional[List[n
specified format (see `annotation_format` in `write_bop` for further details).
:param frames_per_chunk: Number of frames saved in each chunk (called scene in BOP)
"""
if depths is None:
depths = []
if colors is None:
colors = []

# Format of the depth images.
depth_ext = '.png'
Expand Down

0 comments on commit c01949a

Please sign in to comment.