Skip to content

Commit

Permalink
cosypose inference example: add a main scope, ref agimus-project#159
Browse files Browse the repository at this point in the history
  • Loading branch information
nim65s committed Apr 17, 2024
1 parent c412cb3 commit a8746e7
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def run_inference(
return data_TCO.cpu()


if __name__ == "__main__":
def main():
set_logging_level("info")
parser = argparse.ArgumentParser()
parser.add_argument("example_name")
Expand All @@ -77,7 +77,7 @@ def run_inference(
assert (
example_dir.exists()
), "Example {args.example_name} not available, follow download instructions"
dataset_to_use = args.dataset # hope/tless/ycbv
# dataset_to_use = args.dataset # hope/tless/ycbv

# Load data
detections = load_detections(example_dir).to(device)
Expand Down Expand Up @@ -118,3 +118,7 @@ def run_inference(
make_poses_visualization(
rgb, object_dataset, object_datas, camera_data, example_dir
)


if __name__ == "__main__":
main()

0 comments on commit a8746e7

Please sign in to comment.