new_nbv_rec/app_inference.py

112 lines
4.2 KiB
Python
Raw Permalink Normal View History

2025-05-13 09:03:38 +08:00
from PytorchBoot.application import PytorchBootApplication
from runners.global_points_inferencer import GlobalPointsInferencer
from runners.global_and_local_points_inferencer import GlobalAndLocalPointsInferencer
from runners.local_points_inferencer import LocalPointsInferencer
from runners.inference_server import InferencerServer
from runners.evaluate_uncertainty_guide import EvaluateUncertaintyGuide
2025-05-19 16:32:04 +08:00
from runners.evaluate_pbnbv import EvaluatePBNBV
2025-06-04 13:46:52 +08:00
from runners.evaluate_heuristic import Heuristic
2025-05-19 16:32:04 +08:00
2025-05-13 09:03:38 +08:00
@PytorchBootApplication("global_points_inference")
class GlobalPointsInferenceApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
GlobalPointsInferencer("./configs/local/global_only_inference_config.yaml").run()
@PytorchBootApplication("global_and_local_points_inference")
class GlobalAndLocalPointsInferenceApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
GlobalAndLocalPointsInferencer("./configs/local/global_pts_and_local_pts_pose.yaml").run()
@PytorchBootApplication("local_points_inference")
class LocalPointsInferenceApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
LocalPointsInferencer("./configs/local/local_only_inference_config.yaml").run()
2025-05-19 16:32:04 +08:00
@PytorchBootApplication("real_global_only_inference")
class RealGlobalOnlyInferenceApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
GlobalPointsInferencer("./configs/local/real_global_only_inference_config.yaml").run()
@PytorchBootApplication("mlp_inference")
class MLPInferenceApp:
@staticmethod
def start():
GlobalAndLocalPointsInferencer("./configs/local/mlp_inference_config.yaml").run()
2025-05-13 09:03:38 +08:00
@PytorchBootApplication("server")
class InferenceServerApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
InferencerServer("./configs/server/server_inference_server_config.yaml").run()
@PytorchBootApplication("evaluate_uncertainty_guide")
class EvaluateUncertaintyGuideApp:
@staticmethod
def start():
'''
call default or your custom runners here, code will be executed
automatically when type "pytorch-boot run" or "ptb run" in terminal
example:
Trainer("path_to_your_train_config").run()
Evaluator("path_to_your_eval_config").run()
'''
2025-05-19 16:32:04 +08:00
EvaluateUncertaintyGuide("./configs/local/uncertainty_guide_evaluation_config.yaml").run()
@PytorchBootApplication("evaluate_pbnbv")
class EvaluatePBNBVApp:
@staticmethod
def start():
2025-06-04 13:46:52 +08:00
EvaluatePBNBV("./configs/local/pbnbv_evalutaion_config.yaml").run()
@PytorchBootApplication("evaluate_heuristic")
class EvaluateHeuristicApp:
@staticmethod
def start():
Heuristic("./configs/local/heuristic_evaluation.yaml").run()