MCPcopy Create free account
hub / github.com/darglein/ADOP / LoadCheckpoint

Method LoadCheckpoint

src/lib/models/NeuralCamera.cpp:420–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418 }
419}
420void 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
453std::vector<float> NeuralCameraImpl::DownloadExposure()
454{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected