Blender V5.3
denoising.cpp
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#include "session/denoising.h"
6#include "device/cpu/device.h"
7
9#include "util/map.h"
10#include "util/task.h"
11
12#include <OpenImageIO/filesystem.h>
13
15
16/* Utility Functions */
17
18/* Splits in at its last dot, setting suffix to the part after the dot and in to the part before
19 * it. Returns whether a dot was found. */
20static bool split_last_dot(string &in, string &suffix)
21{
22 const size_t pos = in.rfind(".");
23 if (pos == string::npos) {
24 return false;
25 }
26 suffix = in.substr(pos + 1);
27 in = in.substr(0, pos);
28 return true;
29}
30
31/* Separate channel names as generated by Blender.
32 * If views is true:
33 * Inputs are expected in the form RenderLayer.Pass.View.Channel, sets renderlayer to
34 * "RenderLayer.View" Otherwise: Inputs are expected in the form RenderLayer.Pass.Channel */
36 string name, string &renderlayer, string &pass, string &channel, bool multiview_channels)
37{
38 if (!split_last_dot(name, channel)) {
39 return false;
40 }
41 string view;
42 if (multiview_channels && !split_last_dot(name, view)) {
43 return false;
44 }
45 if (!split_last_dot(name, pass)) {
46 return false;
47 }
48 renderlayer = name;
49
50 if (multiview_channels) {
51 renderlayer += "." + view;
52 }
53
54 return true;
55}
56
57/* Channel Mapping */
58
61 string name;
62};
63
64static void fill_mapping(vector<ChannelMapping> &map, int pos, string name, string channels)
65{
66 for (const char *chan = channels.c_str(); *chan; chan++) {
67 map.push_back({pos++, name + "." + *chan});
68 }
69}
70
71static const int INPUT_NUM_CHANNELS = 13;
72static const int INPUT_NOISY_IMAGE = 0;
73static const int INPUT_DENOISING_NORMAL = 3;
74static const int INPUT_DENOISING_ALBEDO = 6;
75static const int INPUT_MOTION = 9;
77{
79 fill_mapping(map, INPUT_NOISY_IMAGE, "Combined", "RGB");
80 fill_mapping(map, INPUT_DENOISING_NORMAL, "Denoising Normal", "XYZ");
81 fill_mapping(map, INPUT_DENOISING_ALBEDO, "Denoising Albedo", "RGB");
82 fill_mapping(map, INPUT_MOTION, "Vector", "XYZW");
83 return map;
84}
85
86static const int OUTPUT_NUM_CHANNELS = 3;
88{
90 fill_mapping(map, 0, "Combined", "RGB");
91 return map;
92}
93
94/* Render-layer Handling. */
95
97{
98 /* Map device input to image channels. */
101
102 for (const ChannelMapping &mapping : input_channels()) {
103 const vector<string>::iterator i = find(channels.begin(), channels.end(), mapping.name);
104 if (i == channels.end()) {
105 return false;
106 }
107
108 const size_t input_channel = mapping.channel;
109 const size_t layer_channel = i - channels.begin();
110 input_to_image_channel[input_channel] = layer_to_image_channel[layer_channel];
111 }
112
113 /* Map device output to image channels. */
116
117 for (const ChannelMapping &mapping : output_channels()) {
118 const vector<string>::iterator i = find(channels.begin(), channels.end(), mapping.name);
119 if (i == channels.end()) {
120 return false;
121 }
122
123 const size_t output_channel = mapping.channel;
124 const size_t layer_channel = i - channels.begin();
125 output_to_image_channel[output_channel] = layer_to_image_channel[layer_channel];
126 }
127
128 /* Check that all buffer channels are correctly set. */
129 for (int i = 0; i < INPUT_NUM_CHANNELS; i++) {
131 }
132 for (int i = 0; i < OUTPUT_NUM_CHANNELS; i++) {
134 }
135
136 return true;
137}
138
139bool DenoiseImageLayer::match_channels(const std::vector<string> &channelnames,
140 const std::vector<string> &neighbor_channelnames)
141{
143
144 assert(mapping.empty());
145 mapping.resize(output_to_image_channel.size(), -1);
146
147 for (int i = 0; i < output_to_image_channel.size(); i++) {
148 const string &channel = channelnames[output_to_image_channel[i]];
149 const std::vector<string>::const_iterator frame_channel = find(
150 neighbor_channelnames.begin(), neighbor_channelnames.end(), channel);
151
152 if (frame_channel == neighbor_channelnames.end()) {
153 return false;
154 }
155
156 mapping[i] = frame_channel - neighbor_channelnames.begin();
157 }
158
159 return true;
160}
161
162/* Denoise Task */
163
168
173
174/* Denoiser Operations */
175
177{
178 /* Load center image */
179 const DenoiseImageLayer &image_layer = image.layers[layer];
180
181 float *buffer_data = buffers.buffer.data();
182 image.read_pixels(image_layer, buffers.params, buffer_data);
183
184 /* Load previous image */
185 if (frame > 0 && !image.read_previous_pixels(image_layer, buffers.params, buffer_data)) {
186 error = "Failed to read neighbor frame pixels";
187 return false;
188 }
189
190 /* Copy to device */
192
193 return true;
194}
195
196/* Task stages */
197
199 PassType type,
201{
202 unique_ptr<Pass> pass = make_unique<Pass>();
203 pass->set_type(type);
204 pass->set_mode(mode);
205
206 passes.push_back(std::move(pass));
207}
208
210{
211 const string center_filepath = denoiser->input[frame];
212 if (!image.load(center_filepath, error)) {
213 return false;
214 }
215
216 /* Use previous frame output as input for subsequent frames. */
217 if (frame > 0 && !image.load_previous(denoiser->output[frame - 1], error)) {
218 return false;
219 }
220
221 if (image.layers.empty()) {
222 error = "No image layers found to denoise in " + center_filepath;
223 return false;
224 }
225
226 /* Enable temporal denoising for frames after the first (which will use the output from the
227 * previous frames). */
228 DenoiseParams params = denoiser->denoiser->get_params();
229 params.temporally_stable = frame > 0;
230 denoiser->denoiser->set_params(params);
231
232 /* Allocate device buffer. */
240
241 BufferParams buffer_params;
242 buffer_params.width = image.width;
243 buffer_params.height = image.height;
244 buffer_params.full_x = 0;
245 buffer_params.full_y = 0;
246 buffer_params.full_width = image.width;
247 buffer_params.full_height = image.height;
248 buffer_params.update_passes(passes);
249
250 passes.clear();
251
252 buffers.reset(buffer_params);
253
254 /* Read pixels for first layer. */
255 current_layer = 0;
257 return false;
258 }
259
260 return true;
261}
262
264{
265 for (current_layer = 0; current_layer < image.layers.size(); current_layer++) {
266 /* Read pixels for secondary layers, first was already loaded. */
267 if (current_layer > 0) {
269 return false;
270 }
271 }
272
273 /* Run task on device. */
274 denoiser->denoiser->denoise_buffer(buffers.params, buffers.params, &buffers, 1, true);
275
276 /* Copy denoised pixels from device. */
278
279 float *result = buffers.buffer.data();
280 float *out = image.pixels.data();
281
283 const int *output_to_image_channel = layer.output_to_image_channel.data();
284
285 for (int y = 0; y < image.height; y++) {
286 for (int x = 0; x < image.width; x++, result += buffers.params.pass_stride) {
287 for (int j = 0; j < OUTPUT_NUM_CHANNELS; j++) {
289 const int image_channel = output_to_image_channel[j];
290 out[image.num_channels * x + image_channel] = result[offset + j];
291 }
292 }
294 }
295 }
296
297 return true;
298}
299
301{
302 const bool ok = image.save_output(denoiser->output[frame], error);
303 free();
304 return ok;
305}
306
308{
309 image.free();
311}
312
313/* Denoise Image Storage */
314
316{
317 width = 0;
318 height = 0;
319 num_channels = 0;
320 samples = 0;
321}
322
327
329{
330 in_previous.reset();
331}
332
334{
335 close_input();
336 pixels.clear();
337}
338
339bool DenoiseImage::parse_channels(const ImageSpec &in_spec, string &error)
340{
341 const std::vector<string> &channels = in_spec.channelnames;
342 const ParamValue *multiview = in_spec.find_attribute("multiView");
343 const bool multiview_channels = (multiview && multiview->type().basetype == TypeDesc::STRING &&
344 multiview->type().arraylen >= 2);
345
346 layers.clear();
347
348 /* Loop over all the channels in the file, parse their name and sort them
349 * by RenderLayer.
350 * Channels that can't be parsed are directly passed through to the output. */
351 map<string, DenoiseImageLayer> file_layers;
352 for (int i = 0; i < channels.size(); i++) {
353 string layer;
354 string pass;
355 string channel;
356 if (parse_channel_name(channels[i], layer, pass, channel, multiview_channels)) {
357 file_layers[layer].channels.push_back(pass + "." + channel);
358 file_layers[layer].layer_to_image_channel.push_back(i);
359 }
360 }
361
362 /* Loop over all detected RenderLayers, check whether they contain a full set of input channels.
363 * Any channels that won't be processed internally are also passed through. */
364 for (map<string, DenoiseImageLayer>::iterator i = file_layers.begin(); i != file_layers.end();
365 ++i)
366 {
367 const string &name = i->first;
368 DenoiseImageLayer &layer = i->second;
369
370 /* Check for full pass set. */
371 if (!layer.detect_denoising_channels()) {
372 continue;
373 }
374
375 layer.name = name;
376 layer.samples = samples;
377
378 /* If the sample value isn't set yet, check if there is a layer-specific one in the input file.
379 */
380 if (layer.samples < 1) {
381 const string sample_string = in_spec.get_string_attribute("cycles." + name + ".samples", "");
382 if (!sample_string.empty()) {
383 if (!sscanf(sample_string.c_str(), "%d", &layer.samples)) {
384 error = "Failed to parse samples metadata: " + sample_string;
385 return false;
386 }
387 }
388 }
389
390 if (layer.samples < 1) {
391 error = string_printf(
392 "No sample number specified in the file for layer %s or on the command line",
393 name.c_str());
394 return false;
395 }
396
397 layers.push_back(layer);
398 }
399
400 return true;
401}
402
404 const BufferParams &params,
405 float *input_pixels)
406{
407 /* Pixels from center file have already been loaded into pixels.
408 * We copy a subset into the device input buffer with channels reshuffled. */
409 const int *input_to_image_channel = layer.input_to_image_channel.data();
410
411 for (int i = 0; i < width * height; i++) {
412 for (int j = 0; j < 3; ++j) {
413 const int offset = params.get_pass_offset(PASS_COMBINED);
414 const int image_channel = input_to_image_channel[INPUT_NOISY_IMAGE + j];
415 input_pixels[i * params.pass_stride + offset + j] =
416 pixels[((size_t)i) * num_channels + image_channel];
417 }
418 for (int j = 0; j < 3; ++j) {
419 const int offset = params.get_pass_offset(PASS_DENOISING_NORMAL);
420 const int image_channel = input_to_image_channel[INPUT_DENOISING_NORMAL + j];
421 input_pixels[i * params.pass_stride + offset + j] =
422 pixels[((size_t)i) * num_channels + image_channel];
423 }
424 for (int j = 0; j < 3; ++j) {
425 const int offset = params.get_pass_offset(PASS_DENOISING_ALBEDO);
426 const int image_channel = input_to_image_channel[INPUT_DENOISING_ALBEDO + j];
427 input_pixels[i * params.pass_stride + offset + j] =
428 pixels[((size_t)i) * num_channels + image_channel];
429 }
430 for (int j = 0; j < 4; ++j) {
431 const int offset = params.get_pass_offset(PASS_MOTION);
432 const int image_channel = input_to_image_channel[INPUT_MOTION + j];
433 input_pixels[i * params.pass_stride + offset + j] =
434 pixels[((size_t)i) * num_channels + image_channel];
435 }
436 }
437}
438
440 const BufferParams &params,
441 float *input_pixels)
442{
443 /* Load pixels from neighboring frames, and copy them into device buffer
444 * with channels reshuffled. */
445 const size_t num_pixels = (size_t)width * (size_t)height;
446 const int num_channels = in_previous->spec().nchannels;
447
448 array<float> neighbor_pixels(num_pixels * num_channels);
449
450 if (!in_previous->read_image(0, 0, 0, num_channels, TypeDesc::FLOAT, neighbor_pixels.data())) {
451 return false;
452 }
453
454 const int *output_to_image_channel = layer.previous_output_to_image_channel.data();
455
456 for (int i = 0; i < width * height; i++) {
457 for (int j = 0; j < 3; ++j) {
458 const int offset = params.get_pass_offset(PASS_DENOISING_PREVIOUS);
459 const int image_channel = output_to_image_channel[j];
460 input_pixels[i * params.pass_stride + offset + j] =
461 neighbor_pixels[((size_t)i) * num_channels + image_channel];
462 }
463 }
464
465 return true;
466}
467
469{
470 /* For multi-part EXR each subimage contains a pass, so we'll read them all. */
471 const int num_subimages = in_spec.get_int_attribute("oiio:subimages", 1);
472 vector<string> channelnames;
473 vector<int> num_channels_subimage;
474 for (int s = 0; s < num_subimages; s++) {
475 const ImageSpec spec = in->spec(s);
476 num_channels_subimage.push_back(spec.nchannels);
477 for (const string &name : spec.channelnames) {
478 channelnames.push_back(name);
479 }
480 }
481
482 num_channels = int(channelnames.size());
483 pixels.resize(size_t(width) * size_t(height) * num_channels);
484
485 /* Read all channels from each subimage. */
486 const int64_t xstride = int64_t(num_channels) * sizeof(float);
487 size_t channel_offset = 0;
488 for (size_t s = 0; s < num_channels_subimage.size(); s++) {
489 if (!in->read_image(s,
490 0,
491 0,
492 num_channels_subimage[s],
493 TypeDesc::FLOAT,
494 pixels.data() + channel_offset,
495 xstride))
496 {
497 return false;
498 }
499 channel_offset += num_channels_subimage[s];
500 }
501
502 /* Update in_spec to reflect the flattened channel list for use in parse_channels. */
503 in->seek_subimage(0, 0);
504 in_spec.channelnames = channelnames;
505 in_spec.nchannels = num_channels;
506 in_spec.channelformats.clear();
507 in_spec.format = TypeDesc::FLOAT;
508
509 return true;
510}
511
512bool DenoiseImage::load(const string &in_filepath, string &error)
513{
514 if (!Filesystem::is_regular(in_filepath)) {
515 error = "Couldn't find file: " + in_filepath;
516 return false;
517 }
518
519 unique_ptr<ImageInput> in(ImageInput::open(in_filepath));
520 if (!in) {
521 error = "Couldn't open file: " + in_filepath;
522 return false;
523 }
524
525 in_spec = in->spec();
526 width = in_spec.width;
527 height = in_spec.height;
528
529 if (!read_pixels(in.get())) {
530 error = "Failed to read image: " + in_filepath;
531 return false;
532 }
533
534 if (!parse_channels(in_spec, error)) {
535 return false;
536 }
537
538 if (layers.empty()) {
539 error = "Could not find a render layer containing denoising data and motion vector passes";
540 return false;
541 }
542
543 return true;
544}
545
546bool DenoiseImage::load_previous(const string &filepath, string &error)
547{
548 if (!Filesystem::is_regular(filepath)) {
549 error = "Couldn't find neighbor frame: " + filepath;
550 return false;
551 }
552
553 unique_ptr<ImageInput> in_neighbor(ImageInput::open(filepath));
554 if (!in_neighbor) {
555 error = "Couldn't open neighbor frame: " + filepath;
556 return false;
557 }
558
559 const ImageSpec &neighbor_spec = in_neighbor->spec();
560 if (neighbor_spec.width != width || neighbor_spec.height != height) {
561 error = "Neighbor frame has different dimensions: " + filepath;
562 return false;
563 }
564
566 if (!layer.match_channels(in_spec.channelnames, neighbor_spec.channelnames)) {
567 error = "Neighbor frame misses denoising data passes: " + filepath;
568 return false;
569 }
570 }
571
572 in_previous = std::move(in_neighbor);
573
574 return true;
575}
576
577bool DenoiseImage::save_output(const string &out_filepath, string &error)
578{
579 /* Save image with identical dimensions, channels and metadata. */
580 ImageSpec out_spec = in_spec;
581
582 /* Ensure that the output frame contains sample information even if the input didn't. */
583 for (int i = 0; i < layers.size(); i++) {
584 const string name = "cycles." + layers[i].name + ".samples";
585 if (!out_spec.find_attribute(name, TypeDesc::STRING)) {
586 out_spec.attribute(name, TypeDesc::STRING, string_printf("%d", layers[i].samples));
587 }
588 }
589
590 /* We don't need input anymore at this point, and will possibly
591 * overwrite the same file. */
592 close_input();
593
594 /* Write to temporary file path, so we denoise images in place and don't
595 * risk destroying files when something goes wrong in file saving. */
596 const string extension = OIIO::Filesystem::extension(out_filepath);
597 const string unique_name = ".denoise-tmp-" + OIIO::Filesystem::unique_path();
598 const string tmp_filepath = out_filepath + unique_name + extension;
599 unique_ptr<ImageOutput> out(ImageOutput::create(tmp_filepath));
600
601 if (!out) {
602 error = "Failed to open temporary file " + tmp_filepath + " for writing";
603 return false;
604 }
605
606 /* Open temporary file and write image buffers. */
607 if (!out->open(tmp_filepath, out_spec)) {
608 error = "Failed to open file " + tmp_filepath + " for writing: " + out->geterror();
609 return false;
610 }
611
612 bool ok = true;
613 if (!out->write_image(TypeDesc::FLOAT, pixels.data())) {
614 error = "Failed to write to file " + tmp_filepath + ": " + out->geterror();
615 ok = false;
616 }
617
618 if (!out->close()) {
619 error = "Failed to save to file " + tmp_filepath + ": " + out->geterror();
620 ok = false;
621 }
622
623 out.reset();
624
625 /* Copy temporary file to output filepath. */
626 string rename_error;
627 if (ok && !OIIO::Filesystem::rename(tmp_filepath, out_filepath, rename_error)) {
628 error = "Failed to move denoised image to " + out_filepath + ": " + rename_error;
629 ok = false;
630 }
631
632 if (!ok) {
633 OIIO::Filesystem::remove(tmp_filepath);
634 }
635
636 return ok;
637}
638
639/* File pattern handling and outer loop over frames */
640
642{
643 /* Initialize task scheduler. */
645
646 /* Initialize device. */
647 device = Device::create(denoiser_device_info, stats, profiler, true);
648 device->load_kernels(KERNEL_FEATURE_DENOISING);
649
650 vector<DeviceInfo> cpu_devices;
651 device_cpu_info(cpu_devices);
652 cpu_device = device_cpu_create(cpu_devices[0], device->stats, device->profiler, true);
653
655 if (denoiser) {
656 denoiser->load_kernels(nullptr);
657 }
658}
659
661{
662 denoiser.reset();
663 device.reset();
665}
666
668{
669 assert(input.size() == output.size());
670
671 const int num_frames = output.size();
672
673 if (!denoiser) {
674 error = "Failed to create denoiser";
675 return false;
676 }
677
678 for (int frame = 0; frame < num_frames; frame++) {
679 /* Skip empty output paths. */
680 if (output[frame].empty()) {
681 continue;
682 }
683
684 /* Execute task. */
685 DenoiseTask task(device.get(), this, frame);
686 if (!task.load()) {
687 error = task.error;
688 return false;
689 }
690
691 if (!task.exec()) {
692 error = task.error;
693 return false;
694 }
695
696 if (!task.save()) {
697 error = task.error;
698 return false;
699 }
700
701 task.free();
702 }
703
704 return true;
705}
706
long long int int64_t
int pass_stride
Definition buffers.h:92
int full_width
Definition buffers.h:85
int get_pass_offset(PassType type, PassMode mode=PassMode::NOISY) const
Definition buffers.cpp:164
int full_height
Definition buffers.h:86
NODE_DECLARE int width
Definition buffers.h:70
void update_passes()
Definition buffers.cpp:117
void read_pixels(const DenoiseImageLayer &layer, const BufferParams &params, float *input_pixels)
bool parse_channels(const ImageSpec &in_spec, string &error)
void close_input()
array< float > pixels
Definition denoising.h:102
vector< DenoiseImageLayer > layers
Definition denoising.h:109
bool read_previous_pixels(const DenoiseImageLayer &layer, const BufferParams &params, float *input_pixels)
int num_channels
Definition denoising.h:96
bool load(const string &in_filepath, string &error)
unique_ptr< ImageInput > in_previous
Definition denoising.h:106
bool load_previous(const string &in_filepath, string &error)
bool save_output(const string &out_filepath, string &error)
ImageSpec in_spec
Definition denoising.h:105
bool temporally_stable
Definition denoise.h:82
DenoiserPipeline * denoiser
Definition denoising.h:161
RenderBuffers buffers
Definition denoising.h:171
bool load_input_pixels(const int layer)
DenoiseTask(Device *device, DenoiserPipeline *denoiser, const int frame)
string error
Definition denoising.h:157
Device * device
Definition denoising.h:162
int current_layer
Definition denoising.h:169
DenoiseImage image
Definition denoising.h:168
std::unique_ptr< Denoiser > denoiser
Definition denoising.h:52
friend class DenoiseTask
Definition denoising.h:46
DenoiserPipeline(DeviceInfo &denoiser_device_info, const DenoiseParams &params)
unique_ptr< Device > cpu_device
Definition denoising.h:51
unique_ptr< Device > device
Definition denoising.h:50
vector< string > input
Definition denoising.h:39
Profiler profiler
Definition denoising.h:49
vector< string > output
Definition denoising.h:43
static unique_ptr< Denoiser > create(Device *denoiser_device, Device *cpu_fallback_device, const DenoiseParams &params, const GraphicsInteropDevice &interop_device)
Definition denoiser.cpp:163
static unique_ptr< Device > create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
device_vector< float > buffer
Definition buffers.h:158
BufferParams params
Definition buffers.h:155
void reset(const BufferParams &params)
Definition buffers.cpp:271
static void exit()
Definition task.cpp:81
static void init(const int num_threads=0)
Definition task.cpp:60
T * resize(const size_t newsize)
void push_back(unique_ptr< T > &&value)
static const int INPUT_NOISY_IMAGE
Definition denoising.cpp:72
static const int OUTPUT_NUM_CHANNELS
Definition denoising.cpp:86
static void fill_mapping(vector< ChannelMapping > &map, int pos, string name, string channels)
Definition denoising.cpp:64
static bool parse_channel_name(string name, string &renderlayer, string &pass, string &channel, bool multiview_channels)
Definition denoising.cpp:35
static CCL_NAMESPACE_BEGIN bool split_last_dot(string &in, string &suffix)
Definition denoising.cpp:20
static const int INPUT_DENOISING_ALBEDO
Definition denoising.cpp:74
static vector< ChannelMapping > output_channels()
Definition denoising.cpp:87
static const int INPUT_DENOISING_NORMAL
Definition denoising.cpp:73
static const int INPUT_NUM_CHANNELS
Definition denoising.cpp:71
static const int INPUT_MOTION
Definition denoising.cpp:75
static void add_pass(unique_ptr_vector< Pass > &passes, PassType type, PassMode mode=PassMode::NOISY)
static vector< ChannelMapping > input_channels()
Definition denoising.cpp:76
void device_cpu_info(vector< DeviceInfo > &devices)
CCL_NAMESPACE_BEGIN unique_ptr< Device > device_cpu_create(const DeviceInfo &info, Stats &stats, Profiler &profiler, bool headless)
#define KERNEL_FEATURE_DENOISING
#define CCL_NAMESPACE_END
#define assert(assertion)
#define layer
PassType
@ PASS_DENOISING_NORMAL
@ PASS_MOTION
@ PASS_COMBINED
@ PASS_DENOISING_ALBEDO
@ PASS_DENOISING_PREVIOUS
PassMode
Definition pass.h:20
@ DENOISED
Definition pass.h:22
@ NOISY
Definition pass.h:21
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
CCL_NAMESPACE_BEGIN string string_printf(const char *format,...)
Definition string.cpp:25
vector< int > previous_output_to_image_channel
Definition denoising.h:75
vector< int > input_to_image_channel
Definition denoising.h:68
bool match_channels(const std::vector< string > &channelnames, const std::vector< string > &neighbor_channelnames)
bool detect_denoising_channels()
Definition denoising.cpp:96
vector< int > output_to_image_channel
Definition denoising.h:72
vector< string > channels
Definition denoising.h:60
vector< int > layer_to_image_channel
Definition denoising.h:62