The hadron resonance gas (HRG) is a widely used description of matter under extreme conditions, e.g., in the context of heavy-ion phenomenology. Commonly used implementations of the HRG employ vacuum hadron masses throughout the hadronic phase and hence do not include possible in-medium effects. Here we investigate this issue, using nonperturbative lattice simulations employing the FASTSUM anisotropic Nf=2+1 ensembles. We study the fate of octet and decuplet baryons as the temperature increases, focussing in particular on the positive- and negative-parity ground states. While the positive-parity ground state masses are indeed seen to be temperature independent, within the error, a strong temperature dependence is observed in the negative-parity channels. We give a simple parametrization of this and formulate an in-medium HRG, which is particularly effective for hyperons. Parity doubling is seen to emerge in the deconfined phase at the level of correlators, with a noticeable effect of the heavier s quark. Channel dependence of this transition is analyzed.