Skip to content

Commit

Permalink
Adjust val-render step
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Mar 20, 2024
1 parent d9b718e commit 95d5abb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions opensplat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ int main(int argc, char *argv[]){
torch::Device device = torch::kCPU;
int displayStep = 1;


if (torch::cuda::is_available() && result.count("cpu") == 0) {
std::cout << "Using CUDA" << std::endl;
device = torch::kCUDA;
Expand Down Expand Up @@ -137,7 +136,7 @@ int main(int argc, char *argv[]){
model.savePlySplat((p.replace_filename(fs::path(p.stem().string() + "_" + std::to_string(step) + p.extension().string())).string()));
}

if (!valRender.empty() && step % displayStep == 0){
if (!valRender.empty() && step % 10 == 0){
torch::Tensor rgb = model.forward(*valCam, step);
cv::Mat image = tensorToImage(rgb.detach().cpu());
cv::cvtColor(image, image, cv::COLOR_RGB2BGR);
Expand Down

0 comments on commit 95d5abb

Please sign in to comment.