Same here:
When I play in front of my teacher, I know she's judging me.
Same with my older sister who walks by sometimes while I'm practicing. My sister likes to criticize in the negative way - a lot - until I told her off one day. Now she doesn't criticize at all but I can tell by her body language as she walks by and by her eyes. She's not very encouraging at all and I don't feel comfortable when she's around. But it has gotten better, if only a little. Why? I don't know why. Less criticism could be one reason. Or that I'm more confident with how I'm practicing and playing.
Back to my teacher:
I don't do anything the same in front of my teacher than when I'm at home. At home I screw around a lot: randomly play whatever I feel like, practice whatever I feel like, practice the way I feel like, and most importantly I try to learn the piano, as in improvising, playing "stuff" that just seems to fit my hands, basically stuff that my teacher hasn't assigned me.
I do practice what she assigned (scales, arpeggios, pieces, etc.) but when I do practice them, they are so sporadic (practice it here, then practice it some more but later) and compared to what I was screwing around, it sounds so out of the ordinary. I get myself into everything and when it comes down to what she assigned, it is so strange.
Here's an example of what I'm comfortable doing:
Arpeggio's are assigned.
I practice it but like to play chord progressions as I play the arpeggios and also add some damper into it and maybe some sostenuto and soft pedal.
What I'm not comfortable doing:
Sitting at the bench and playing arpeggios with both hands simultaneously. I can do it but it is out of the ordinary of my practice style. I also can't get into it as with the way I'm comfortable practicing and it sounds so boring and dull...
After such practicing when at the lesson in front of teacher:
I play the arpeggio's the way I'm not comfortable practicing. I think it sounds horrible and I can't get it up to speed the way I want.
---
I know that this is one of my problems with HOW I PRACTICE and how I show it to my teacher. This is one reason I'm uncomfortable playing in front of my teacher. And also, my teacher tells me to play a certain piece one way - her way - and I don't agree with it so I practice it the way I think it should be played and on the off chance I feel like it, I practice it the way she asked me to play it. So here I am playing the same piece two different ways: one way I practice all the time, the other on the occasions I feel like practicing it. So I go to show her what I've practiced and I'm not comfortable playing it the way she asked me to play it. And I wouldn't want to show her the way I like to play it... :-/ Fear of being told I didn't practice what she asked me.
... But sometimes, the piece just carries itself and I forget she's there and bingo! (G14!) I relax completely and I feel great, I feel confident. I don't fear her remarks.
At home, I'm comfortable because I'm not playing for anyone else buy myself. This is where we relate, right?
BUT! If I pretend that people are watching me, I get nervous: my heart rate increases, I sweat more, I get jittery, and when I pretend to play a piece before an audience, I screw up by hitting wrong notes, missing the notes completely...
I screw up so much if I pretend that I try not to pretend too much. But I'm started to pretend a bit more and it seems to "cure" that nervousness just a little bit. Just a little. But I haven't pretended for very long. I'm sure I'll be pretending a lot more just so I'll be comfortable. Any little bit helps, right?
---
Other advice from others:
Purposely get someone listen to you play. I've never tried this but I'm sure it helps lots. I have sporadically played in front of people but they were not anticipating me playing so it was much easier to play and not get nervous.
I guess I'm like Chopin. Some people love the attention like Liszt. But I'm like Chopin: insecure with my playing so I can't play in public because of the piercing eyes of criticism.