| 418 | } |
| 419 | } |
| 420 | void NeuralCameraImpl::LoadCheckpoint(const std::string& checkpoint_prefix) |
| 421 | { |
| 422 | if (vignette_net && std::filesystem::exists(checkpoint_prefix + "vignette.pth")) |
| 423 | { |
| 424 | std::cout << "Load Checkpoint vignette" << std::endl; |
| 425 | torch::load(vignette_net, checkpoint_prefix + "vignette.pth"); |
| 426 | } |
| 427 | |
| 428 | if (camera_response && std::filesystem::exists(checkpoint_prefix + "response.pth")) |
| 429 | { |
| 430 | std::cout << "Load Checkpoint response" << std::endl; |
| 431 | torch::load(camera_response, checkpoint_prefix + "response.pth"); |
| 432 | } |
| 433 | |
| 434 | if (motion_blur && std::filesystem::exists(checkpoint_prefix + "mb.pth")) |
| 435 | { |
| 436 | std::cout << "Load Checkpoint motion blur" << std::endl; |
| 437 | torch::load(motion_blur, checkpoint_prefix + "mb.pth"); |
| 438 | } |
| 439 | |
| 440 | if (white_balance_values.defined() && std::filesystem::exists(checkpoint_prefix + "wb.pth")) |
| 441 | { |
| 442 | std::cout << "Load Checkpoint white balance" << std::endl; |
| 443 | torch::load(white_balance_values, checkpoint_prefix + "wb.pth"); |
| 444 | } |
| 445 | |
| 446 | if (exposures_values.defined() && std::filesystem::exists(checkpoint_prefix + "ex.pth")) |
| 447 | { |
| 448 | std::cout << "Load Checkpoint exposures_values" << std::endl; |
| 449 | torch::load(exposures_values, checkpoint_prefix + "ex.pth"); |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | std::vector<float> NeuralCameraImpl::DownloadExposure() |
| 454 | { |
nothing calls this directly
no outgoing calls
no test coverage detected