Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 2, 2024
1 parent 8e0be8a commit 71b4d17
Show file tree
Hide file tree
Showing 87 changed files with 235 additions and 165 deletions.
7 changes: 4 additions & 3 deletions demo.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/usr/bin/env python
import os

import b3d
import b3d.bayes3d as bayes3d
import fire
import genjax
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr
from b3d import Pose
from genjax import Pytree
from tqdm import tqdm

import b3d
import b3d.bayes3d as bayes3d
from b3d import Pose


def test_demo():

Check failure on line 18 in demo.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demo.py:2:1: I001 Import block is un-sorted or un-formatted
rr.init("demo")
Expand Down
3 changes: 2 additions & 1 deletion demos/detector_segmenter.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import io
import os

import b3d
import jax
import jax.numpy as jnp
import numpy
Expand All @@ -19,6 +18,8 @@
)
from transformers.models.detr.feature_extraction_detr import rgb_to_id

import b3d

processor = OwlViTProcessor.from_pretrained("google/owlvit-base-patch32")

Check failure on line 23 in demos/detector_segmenter.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/detector_segmenter.py:1:1: I001 Import block is un-sorted or un-formatted
model = OwlViTForObjectDetection.from_pretrained("google/owlvit-base-patch32")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import functools
import os

import b3d
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr

import b3d
from b3d import Pose

rr.init("gradients")

Check failure on line 14 in demos/differentiable_renderer/dense_fitting/standalone_nishad_demo.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/dense_fitting/standalone_nishad_demo.py:3:1: I001 Import block is un-sorted or un-formatted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import os
from functools import partial

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import jax
import jax.numpy as jnp
import optax
import rerun as rr
from b3d import Mesh, Pose
from tqdm import tqdm

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
from b3d import Mesh, Pose

rr.init("gradients")

Check failure on line 14 in demos/differentiable_renderer/gradient_based_pose_estimation.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/gradient_based_pose_estimation.py:1:1: I001 Import block is un-sorted or un-formatted
rr.connect("127.0.0.1:8812")

Expand Down
7 changes: 4 additions & 3 deletions demos/differentiable_renderer/gradients_for_mug.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import os
from functools import partial

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import jax
import jax.numpy as jnp
import optax
import rerun as rr
import trimesh
from b3d import Pose
from tqdm import tqdm

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
from b3d import Pose

rr.init("gradients")

Check failure on line 15 in demos/differentiable_renderer/gradients_for_mug.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/gradients_for_mug.py:1:1: I001 Import block is un-sorted or un-formatted
rr.connect("127.0.0.1:8812")

Expand Down
5 changes: 3 additions & 2 deletions demos/differentiable_renderer/patch_tracking/demo_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os

import b3d
import b3d.utils as utils
import jax
import jax.numpy as jnp
import trimesh

import b3d
import b3d.utils as utils
from b3d import Pose

### Utils ###

Check failure on line 11 in demos/differentiable_renderer/patch_tracking/demo_utils.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/patch_tracking/demo_utils.py:1:1: I001 Import block is un-sorted or un-formatted
Expand Down
6 changes: 3 additions & 3 deletions demos/differentiable_renderer/patch_tracking/model.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import genjax
import jax
import jax.numpy as jnp
import rerun as rr
from b3d.modeling_utils import uniform_pose

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import demos.differentiable_renderer.patch_tracking.demo_utils as utils
from b3d.modeling_utils import uniform_pose


def normalize(v):

Check failure on line 12 in demos/differentiable_renderer/patch_tracking/model.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/patch_tracking/model.py:1:1: I001 Import block is un-sorted or un-formatted
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import b3d
import b3d.chisight.dense.patch_tracking as tracking
import numpy as np
import rerun as rr
from b3d.chisight.dense.model import rr_log_uniformpose_meshes_to_image_model_trace
from tqdm import tqdm

import b3d
import b3d.chisight.dense.patch_tracking as tracking
import demos.differentiable_renderer.patch_tracking.demo_utils as du
from b3d.chisight.dense.model import rr_log_uniformpose_meshes_to_image_model_trace

rr.init("multiple_patch_tracking_2")

Check failure on line 10 in demos/differentiable_renderer/patch_tracking/multiple_patch_tracker_2.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/patch_tracking/multiple_patch_tracker_2.py:1:1: I001 Import block is un-sorted or un-formatted
rr.connect("127.0.0.1:8812")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

import os

import b3d
import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import genjax
import jax
import jax.numpy as jnp
import numpy as np
import optax
import rerun as rr
import trimesh
from b3d import Pose
from tqdm import tqdm

import b3d
import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import demos.differentiable_renderer.patch_tracking.demo_utils as du
import demos.differentiable_renderer.patch_tracking.model as m
from b3d import Pose

rr.init("multiple_patch_tracking")

Check failure on line 21 in demos/differentiable_renderer/patch_tracking/multiple_patch_tracking.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/patch_tracking/multiple_patch_tracking.py:3:1: I001 Import block is un-sorted or un-formatted
rr.connect("127.0.0.1:8812")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
### Preliminaries ###

import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import genjax
import jax
import jax.numpy as jnp
import optax
import rerun as rr
from b3d import Pose
from tqdm import tqdm

import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import demos.differentiable_renderer.patch_tracking.demo_utils as du
import demos.differentiable_renderer.patch_tracking.model as m
from b3d import Pose

rr.init("single_patch_tracking")

Check failure on line 16 in demos/differentiable_renderer/patch_tracking/single_patch_tracking_adam.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (I001)

demos/differentiable_renderer/patch_tracking/single_patch_tracking_adam.py:3:1: I001 Import block is un-sorted or un-formatted
rr.connect("127.0.0.1:8812")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

import time

import b3d
import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import genjax
import jax
import jax.numpy as jnp
import rerun as rr
from b3d import Pose
from tqdm import tqdm

import b3d
import b3d.chisight.dense.differentiable_renderer as r
import b3d.chisight.dense.likelihoods as l
import demos.differentiable_renderer.patch_tracking.demo_utils as du
import demos.differentiable_renderer.patch_tracking.model as m
from b3d import Pose

rr.init("single_patch_tracking-mh")
rr.connect("127.0.0.1:8812")
Expand Down
7 changes: 4 additions & 3 deletions demos/differentiable_renderer/test_barycentric_interp.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import b3d.chisight.dense.likelihoods as likelihoods
import jax
import jax.numpy as jnp
import rerun as rr

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import b3d.chisight.dense.likelihoods as likelihoods
from b3d import Pose

# Set up OpenGL renderer
Expand Down
6 changes: 3 additions & 3 deletions demos/differentiable_renderer/test_basic_gd.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import time

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import b3d.chisight.dense.likelihoods as likelihoods
import genjax
import jax
import jax.numpy as jnp
import rerun as rr

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import b3d.chisight.dense.likelihoods as likelihoods
import demos.differentiable_renderer.utils as utils

# Set up OpenGL renderer
Expand Down
3 changes: 2 additions & 1 deletion demos/differentiable_renderer/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import b3d
import jax
import jax.numpy as jnp

import b3d
from b3d import Pose


Expand Down
5 changes: 3 additions & 2 deletions demos/fork_knife_smc_identity_pose.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import os

import b3d
import genjax
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr
import trimesh
from b3d import Pose
from tqdm import tqdm

import b3d
from b3d import Pose

### Choose experiment

INPUT = "fork-visible" # TODO make one dataset with both objects?
Expand Down
5 changes: 3 additions & 2 deletions demos/graphics_edits_demo/demo_visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
import os
import pickle

import b3d
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr
import trimesh
from b3d import Pose
from tqdm import tqdm

import b3d
from b3d import Pose

rr.init("demo_visualize3")
rr.connect("127.0.0.1:8812")

Expand Down
3 changes: 2 additions & 1 deletion demos/graphics_edits_demo/vkm_demo.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import os

import b3d
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr
import trimesh

import b3d
from b3d import Pose

rr.init("vkm_demo2")
Expand Down
2 changes: 1 addition & 1 deletion demos/mesh_fitting/demo.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import os

import b3d
import genjax
import jax
import jax.numpy as jnp
import optax
import rerun as rr
from tqdm import tqdm

import b3d
import demos.mesh_fitting.model as m
import demos.mesh_fitting.tessellation as t

Expand Down
2 changes: 1 addition & 1 deletion demos/mesh_fitting/demo_depth_init.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import os

import b3d
import genjax
import jax
import rerun as rr

import b3d
import demos.mesh_fitting.model as m
import demos.mesh_fitting.utils as u

Expand Down
5 changes: 3 additions & 2 deletions demos/mesh_fitting/model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
import genjax
import jax
import jax.numpy as jnp
import rerun as rr

import b3d
import b3d.chisight.dense.differentiable_renderer as rendering
from b3d.modeling_utils import uniform_pose


Expand Down
2 changes: 1 addition & 1 deletion demos/mesh_fitting/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import b3d
import jax
import jax.numpy as jnp

import b3d
import demos.mesh_fitting.tessellation as t


Expand Down
3 changes: 2 additions & 1 deletion demos/posterior_datasets/identity_posterior_data_gen.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import os

import b3d
import jax
import jax.numpy as jnp
import numpy as np
import rerun as rr
import trimesh

import b3d

width = 200
height = 200
fx = 300.0
Expand Down
3 changes: 2 additions & 1 deletion demos/posterior_datasets/pose_posterior_data_gen.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import os

import b3d
import jax
import jax.numpy as jnp
import rerun as rr
import trimesh

import b3d
from b3d import Pose

rr.init("demo")
Expand Down
3 changes: 2 additions & 1 deletion demos/sparse_model/cotracker.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import argparse
import time

import b3d
import numpy as np
import torch

import b3d

parser = argparse.ArgumentParser("r3d_to_video_input")
parser.add_argument("input", help=".r3d File", type=str)
args = parser.parse_args()
Expand Down
Loading

0 comments on commit 71b4d17

Please sign in to comment.