1
1
# ## A Pluto.jl notebook ###
2
- # v0.15 .1
2
+ # v0.16 .1
3
3
4
4
using Markdown
5
5
using InteractiveUtils
@@ -8,11 +8,11 @@ using InteractiveUtils
8
8
using Pkg; Pkg. develop (path= " .." ); Pkg. activate (" .." )
9
9
10
10
# ╔═╡ 38c9ced5-dcf8-4e03-ac07-7c435687861b
11
- using FlowOverCircle , Plots
11
+ using SuperResolution , Plots
12
12
13
13
# ╔═╡ 50ce80a3-a1e8-4ba9-a032-dad315bcb432
14
14
md "
15
- # Markov Neural Operator
15
+ # Super Resolution with MNO
16
16
17
17
JingYu Ning
18
18
"
28
28
29
29
# ╔═╡ 5268feee-bda2-4612-9d4c-a1db424a11c7
30
30
begin
31
- n = 20
32
- data = FlowOverCircle . gen_data (LinRange (100 , 100 + n- 1 , n))
31
+ n = 10
32
+ data = SuperResolution . gen_data (LinRange (100 , 100 + n- 1 , n))
33
33
end ;
34
34
35
- # ╔═╡ 9b02b6a2-33c3-4ca6-bfba-0bd74b664830
35
+ # ╔═╡ 5531bba6-94bd-4c99-be8c-43fe19ad8a60
36
+ md "
37
+ ## Training
38
+ "
39
+
40
+ # ╔═╡ 74fc528f-ccd4-4670-9b17-dbfa7a1c74b6
41
+ md "
42
+ Apart from just training a MNO, here, we train the model with lower resolution (96x64) and inference result with higher resolution (192x128).
43
+ "
44
+
45
+ # ╔═╡ f6d1ce85-a195-4ab1-bd3a-dbd4b0d1fcca
36
46
begin
37
47
anim = @animate for i in 1 : size (data)[end ]
38
- heatmap (data[1 , :, : , i]' , color= :coolwarm , clim= (- 1.5 , 1.5 ))
48
+ heatmap (data[1 , 1 : 2 : end , 1 : 2 : end , i]' , color= :coolwarm , clim= (- 1.5 , 1.5 ))
39
49
scatter! (
40
- [size (data, 3 )÷ 2 ], [size (data, 3 )÷ 2 - 1 ],
50
+ [size (data, 3 )÷ 4 - 1 ], [size (data, 3 )÷ 4 - 1 ],
41
51
markersize= 45 , color= :black , legend= false , ticks= false
42
52
)
43
53
annotate! (5 , 5 , text (" i=$i " , :left ))
@@ -54,7 +64,7 @@ Use the first data generated above as the initial state, and apply the operator
54
64
55
65
# ╔═╡ fbc287b8-f232-4350-9948-2091908e5a30
56
66
begin
57
- m = FlowOverCircle . get_model ()
67
+ m = SuperResolution . get_model ()
58
68
59
69
states = Array {Float32} (undef, size (data))
60
70
states[:, :, :, 1 ] .= view (data, :, :, :, 1 )
68
78
anim_model = @animate for i in 1 : size (states)[end ]
69
79
heatmap (states[1 , :, :, i]' , color= :coolwarm , clim= (- 1.5 , 1.5 ))
70
80
scatter! (
71
- [size (data, 3 )÷ 2 ], [size (data, 3 )÷ 2 - 1 ],
81
+ [size (data, 3 )÷ 2 - 1 ], [size (data, 3 )÷ 2 - 1 ],
72
82
markersize= 45 , color= :black , legend= false , ticks= false
73
83
)
74
84
annotate! (5 , 5 , text (" i=$i " , :left ))
79
89
# ╔═╡ Cell order:
80
90
# ╟─50ce80a3-a1e8-4ba9-a032-dad315bcb432
81
91
# ╟─59769504-ebd5-4c6f-981f-d03826d8e34a
82
- # ╟─ 194baef2-0417-11ec-05ab-4527ef614024
92
+ # ╠═ 194baef2-0417-11ec-05ab-4527ef614024
83
93
# ╠═38c9ced5-dcf8-4e03-ac07-7c435687861b
84
94
# ╟─823b3547-6723-43cf-85e6-cc6eb44efea1
85
95
# ╠═5268feee-bda2-4612-9d4c-a1db424a11c7
86
- # ╟─9b02b6a2-33c3-4ca6-bfba-0bd74b664830
96
+ # ╟─5531bba6-94bd-4c99-be8c-43fe19ad8a60
97
+ # ╟─74fc528f-ccd4-4670-9b17-dbfa7a1c74b6
98
+ # ╠═f6d1ce85-a195-4ab1-bd3a-dbd4b0d1fcca
87
99
# ╟─55058635-c7e9-4ee3-81c2-0153e84f4c8e
88
100
# ╠═fbc287b8-f232-4350-9948-2091908e5a30
89
101
# ╟─a0b5e94c-a839-4cc0-a325-1a4ac39fafbc
0 commit comments