20. In a $7 \times 7$ grid, some cells are colored black and the rest are colored white, with each color occupying at least one cell. If a figure, when rotated $90^{\circ}$, still coincides with the original figure, and if it can be folded along its diagonal such that both sides of the fold coincide, it is called "symmetric". The total number of symmetric figures is ( ).
(A) 510
(B) 1022
(C) 8190
(D) 8192
(E) 65534
20. B.

As shown in Figure 6.
To make the figure symmetrical, black and white colors can only be applied to 10 regions, with a total of $2^{10}=1024$ different coloring methods. However, each color must cover at least one square, so we exclude the all-black and all-white cases, leaving $2^{10}-2=1022$ methods.