We know that she is imagining things when she begins to detect patterns on the yellow wallpaper that somehow give her a message that there is someone in there. At first she sees the patterns changing shapes, and then she begins to see a specific pattern when she feels there is someone in there trapped and begging to come out. As this is happening, Jane is progressing into psychosis, probably caused by a nasty form of post partum depression. After that, she begins to feel responsible for that woman or shape trapped inside the yellow wallpaper and she begins to tear it apart in hopes of saving the figure, woman, or shape inside of it. We, as readers also know that this was an allegory to herself.
In "The Yellow Wallpaper," when the unnamed narrator is moved to the "atrocious nursery" her inner reality begins to gain control of her. She writes that she fancies that she sees people walking the numerous paths and arbors outside, but this imaginative exercise is squelched by her husband, calling it and her habit of story-making a "nervous weakness." With this negativity and no companionship, the narrator focuses on what is before her: the wallpaper. She writes that it "looks to me as if it knew what a vicious influence it had!" Without companionship, Gilman's narrator attributes human qualities to it, saying it has "impertinence" and "unblinking eyes" and "so much expression." The "inharmonious" pattern of the wallpaper works negatively against the artistic nature of the narrator for whom lack of symmetry would be more disturbing than for an unartistic person.
Her fixation on the paper is the beginning of the narrator's mental unraveling. While she reflects upon other things, such as the furniture, she returns again and again to the wallpaper that "sticketh." She declares that she does not mind the room's gouged floors, etc.,"--only the paper." Soon, she perceives "a strange, provoking, formless sort of figure," and her inner consciousness begins to emerge; later, it overtakes her consciousness.