  Channel State Information (CSI) is widely adopted as a feature for indoor
localization. Taking advantage of the abundant information from the CSI, people
can be accurately sensed even without equipped devices. However, the
positioning error increases severely in non-line-of-sight (NLoS) regions.
Reconfigurable intelligent surface (RIS) has been introduced to improve signal
coverage in NLoS areas, which can re-direct and enhance reflective signals with
massive meta-material elements. In this paper, we have proposed a
Transformer-based RIS-assisted device-free sensing for joint people counting
and localization (WiRiS) system to precisely predict the number of people and
their corresponding locations through configuring RIS. A series of predefined
RIS beams is employed to create inputs of fingerprinting CSI features as
sequence-to-sequence learning database for Transformer. We have evaluated the
performance of proposed WiRiS system in both ray-tracing simulators and
experiments. Both simulation and real-world experiments demonstrate that people
counting accuracy exceeds 90\%, and the localization error can achieve the
centimeter-level, which outperforms the existing benchmarks without employment
of RIS.
