Show AI denoise in the manual on sharp, noisy frames
The ISO 8000 Brooklyn Bridge frame was soft at 1:1 before any denoising, so it could not show that Best keeps detail. The section now shows five sharp frames from ISO 4000 to 16000, each at 1:1 where hard edges meet flat areas, Bilinear beside Best: a subway poster, a cathedral portal, a circus clock, a clinic sign and graffiti. Fast is described, not shown. at_develop opens a DNG when the name carries its extension. The scene now fails when Best never lands instead of capturing the undenoised frame twice.
This commit is contained in:
+11
-6
@@ -236,13 +236,18 @@ already used is quick.
|
||||
`Strength` eases it off: below 100 % it puts back some of what was removed,
|
||||
as grain without colour, for a picture that does not look too smooth.
|
||||
|
||||
The lamp and railing of a night frame at ISO 8000, at 1:1, by each method:
|
||||
Five sharp photographs at high ISO, each at 1:1 where hard edges meet
|
||||
flat areas, as the camera's ordinary conversion gives them and as `Best`
|
||||
develops them. The grain goes from the flat paper, stone, canvas and paint; the
|
||||
lines, the lettering and the carving keep their edges:
|
||||
|
||||
| Bilinear | Fast |
|
||||
|---|---|
|
||||
|  |  |
|
||||
| **Best** | |
|
||||
|  | |
|
||||
| | Bilinear | Best |
|
||||
|---|---|---|
|
||||
| ISO 4000 |  |  |
|
||||
| ISO 8000 |  |  |
|
||||
| ISO 12800 |  |  |
|
||||
| ISO 16000 |  |  |
|
||||
| ISO 16000 |  |  |
|
||||
|
||||
It works on raw files from any camera with the usual colour pattern of
|
||||
red, green and blue squares — not on JPEGs, and not yet on Fujifilm's
|
||||
|
||||
+10
-5
@@ -315,11 +315,16 @@ or exported, does not wait a second time, and switching back to a method
|
||||
already used is quick.
|
||||
<code>Strength</code> eases it off: below 100 % it puts back some of what was removed,
|
||||
as grain without colour, for a picture that does not look too smooth.</p>
|
||||
<p>The lamp and railing of a night frame at ISO 8000, at 1:1, by each method:</p>
|
||||
<table><thead><tr><th>Bilinear</th><th>Fast</th></tr></thead><tbody>
|
||||
<tr><td><img src="media/develop-denoise-bilinear.png" alt="The railing and the lamp at ISO 8000, as the camera recorded them" /></td><td><img src="media/develop-denoise-fast.png" alt="The same, with the Fast network" /></td></tr>
|
||||
<tr><td><strong>Best</strong></td><td></td></tr>
|
||||
<tr><td><img src="media/develop-denoise-best.png" alt="The same, with the Best network" /></td><td></td></tr>
|
||||
<p>Five sharp photographs at high ISO, each at 1:1 where hard edges meet
|
||||
flat areas, as the camera's ordinary conversion gives them and as <code>Best</code>
|
||||
develops them. The grain goes from the flat paper, stone, canvas and paint; the
|
||||
lines, the lettering and the carving keep their edges:</p>
|
||||
<table><thead><tr><th></th><th>Bilinear</th><th>Best</th></tr></thead><tbody>
|
||||
<tr><td>ISO 4000</td><td><img src="media/develop-denoise-poster-bilinear.png" alt="A subway poster's masthead at ISO 4000, at 1:1, as the camera recorded it" /></td><td><img src="media/develop-denoise-poster-best.png" alt="The same with Best" /></td></tr>
|
||||
<tr><td>ISO 8000</td><td><img src="media/develop-denoise-portal-bilinear.png" alt="The carving round a cathedral door at ISO 8000, at 1:1, as the camera recorded it" /></td><td><img src="media/develop-denoise-portal-best.png" alt="The same with Best" /></td></tr>
|
||||
<tr><td>ISO 12800</td><td><img src="media/develop-denoise-clock-bilinear.png" alt="A clock's numerals over a circus ring at ISO 12800, at 1:1, as the camera recorded it" /></td><td><img src="media/develop-denoise-clock-best.png" alt="The same with Best" /></td></tr>
|
||||
<tr><td>ISO 16000</td><td><img src="media/develop-denoise-sign-bilinear.png" alt="Lettering on a white panel at ISO 16000, at 1:1, as the camera recorded it" /></td><td><img src="media/develop-denoise-sign-best.png" alt="The same with Best" /></td></tr>
|
||||
<tr><td>ISO 16000</td><td><img src="media/develop-denoise-graffiti-bilinear.png" alt="Graffiti on a white wall at ISO 16000, at 1:1, as the camera recorded it" /></td><td><img src="media/develop-denoise-graffiti-best.png" alt="The same with Best" /></td></tr>
|
||||
</tbody></table>
|
||||
<p>It works on raw files from any camera with the usual colour pattern of
|
||||
red, green and blue squares — not on JPEGs, and not yet on Fujifilm's
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+47
-36
@@ -63,7 +63,6 @@ ALPS_SKY = '_MG_8330' # an upright alpine frame, its top third sky and clo
|
||||
TOWER = '_MG_8693' # towers shot looking up: verticals that converge
|
||||
ROAD = '_MG_8672' # a road under a sky, with marks on it: masks and repair
|
||||
ROAD_MARK = (0.305, 0.794) # a dark mark on its tarmac
|
||||
DENOISE = '_MG_8862' # Brooklyn Bridge at ISO 8000: a lit railing, a lamp and a camera against the night
|
||||
|
||||
# --- the registry -----------------------------------------------------------
|
||||
SCENES = {}
|
||||
@@ -259,14 +258,17 @@ def cell_width():
|
||||
|
||||
def at_develop(photo=CHINATOWN):
|
||||
"""`photo` open in develop, on the Photo tool, the All group, the
|
||||
column at its top, and the edit as it was opened."""
|
||||
if dr.present('‹ Library@Button') and dr.present(f'{photo}.CR2'):
|
||||
column at its top, and the edit as it was opened. A name without an
|
||||
extension is a CR2."""
|
||||
stem, ext = os.path.splitext(photo)
|
||||
name = photo if ext else f'{photo}.CR2'
|
||||
if dr.present('‹ Library@Button') and dr.present(name):
|
||||
pass
|
||||
else:
|
||||
at_library()
|
||||
grid_top()
|
||||
dr.click(*cell(photo))
|
||||
dr.wait_for(f'{photo}.CR2', 30)
|
||||
dr.click(*cell(stem))
|
||||
dr.wait_for(name, 30)
|
||||
wait_canvas()
|
||||
for done in ('Done Composing', 'Done Masking', 'Done Repairing'):
|
||||
if dr.present(f'{done}@Button'):
|
||||
@@ -842,43 +844,52 @@ def develop_zoom():
|
||||
pause(1.2)
|
||||
|
||||
|
||||
# The methods in the order the scene visits them: `Best` is what the
|
||||
# photograph opens with, then each smaller network, then none.
|
||||
DENOISE_METHODS = ['Best', 'Fast', 'Bilinear']
|
||||
DENOISE_CLOSE_UP = 560 # pixels of canvas, square, around the lamp at 1:1
|
||||
# Sharp, noisy frames, each with a point on it at 1:1 where hard edges meet
|
||||
# flat areas — where a denoiser either keeps the edge or smears it: a slug
|
||||
# for its pictures, the file, and the point as fractions of the photograph.
|
||||
DENOISE_FRAMES = [
|
||||
('poster', '_MG_8953', (0.40, 0.31)), # ISO 4000: a subway poster's masthead, lines on paper
|
||||
('portal', '_MG_4762', (0.18, 0.22)), # ISO 8000: carving round a cathedral door, smooth stone
|
||||
('clock', '_MG_4810', (0.47, 0.39)), # ISO 12800: a circus clock's numerals on flat canvas
|
||||
('sign', 'IMG_2515.dng', (0.66, 0.52)), # ISO 16000: lettering and a swoosh on a white panel
|
||||
('graffiti', 'IMG_2041.dng', (0.695, 0.655)), # ISO 16000: ink lines and dots on a white wall
|
||||
]
|
||||
DENOISE_CLOSE_UP = 480 # pixels of canvas, square, around the point at 1:1
|
||||
|
||||
|
||||
@scene(media=[f'develop-denoise-{m.lower()}.png' for m in DENOISE_METHODS],
|
||||
@scene(media=[f'develop-denoise-{slug}-{m}.png' for slug, _, _ in DENOISE_FRAMES
|
||||
for m in ('bilinear', 'best')],
|
||||
sources=DEVELOP_SRC + ['ui/dr-ui/src/develop/denoise.rs', 'core/dr-denoise/**',
|
||||
'core/dr-pipeline/src/learned_denoise.rs', 'models/denoise/**'])
|
||||
def develop_denoise():
|
||||
"""The lit lamp and railing of an ISO 8000 night frame at 1:1, once per
|
||||
AI Denoise method, each cut to the same square of the canvas. Waits for
|
||||
each network rather than for a fixed time: on the CPU, which the demo
|
||||
profile uses, Best takes several times what Fast does."""
|
||||
mark = log_size()
|
||||
at_develop(DENOISE)
|
||||
a = dr.photo(0.45, 0.55) # the lit lamp, the railing and the skyline over the water
|
||||
dr.move(*a)
|
||||
pause(0.3)
|
||||
dr.x('click', '--repeat', 2, '--delay', 80, 1)
|
||||
pause(1.5)
|
||||
group('Detail')
|
||||
in_column('AI Denoise@Text')
|
||||
for method in DENOISE_METHODS:
|
||||
if method != 'Best':
|
||||
mark = log_size()
|
||||
dr.click(*in_column(f'{method}@RadioButton'))
|
||||
if method != 'Bilinear':
|
||||
t0 = time.time()
|
||||
while time.time() - t0 < 600 and not denoise_landed(mark):
|
||||
pause(0.5)
|
||||
"""Each frame at 1:1 on its point, once as Best develops it — what a
|
||||
raw opens with — and once by Bilinear, the camera's ordinary
|
||||
conversion, cut to the same square of the canvas. Waits for the network
|
||||
rather than for a fixed time: on the CPU, which the demo profile uses,
|
||||
it takes many seconds."""
|
||||
for slug, photo, (fx, fy) in DENOISE_FRAMES:
|
||||
mark = log_size()
|
||||
at_develop(photo)
|
||||
a = dr.photo(fx, fy)
|
||||
dr.move(*a)
|
||||
pause(0.3)
|
||||
dr.x('click', '--repeat', 2, '--delay', 80, 1)
|
||||
pause(1.5)
|
||||
close_up(f'develop-denoise-{method.lower()}', a)
|
||||
undo_all()
|
||||
dr.move(*a)
|
||||
dr.x('click', '--repeat', 2, '--delay', 80, 1)
|
||||
pause(1.2)
|
||||
t0 = time.time()
|
||||
while not denoise_landed(mark):
|
||||
if time.time() - t0 > 600:
|
||||
raise TimeoutError(f'{photo}: Best never landed')
|
||||
pause(0.5)
|
||||
pause(1.5)
|
||||
close_up(f'develop-denoise-{slug}-best', a)
|
||||
group('Detail')
|
||||
dr.click(*in_column('Bilinear@RadioButton'))
|
||||
pause(3.0)
|
||||
close_up(f'develop-denoise-{slug}-bilinear', a)
|
||||
undo_all()
|
||||
dr.move(*a)
|
||||
dr.x('click', '--repeat', 2, '--delay', 80, 1)
|
||||
pause(1.2)
|
||||
|
||||
|
||||
def close_up(name, p, size=DENOISE_CLOSE_UP):
|
||||
|
||||
Reference in New Issue
Block a user