3.8 GPA, but 3 Fs and 1 D on transcript
So here's a funny thing: I have 3 Fs and 1 D on my transcript, but my GPA is ~3.8, which is "high" because I double majored in math and computer science. The reason for those 4 bad grades is that I had 2 bad semesters where I suffered from depression; I didn't drop the classes before the deadline so I ended up failing the classes. However I retook the classes and got As in them (hence my GPA), and in fact got A/A-s in all subsequent classes (quite an improvement). I plan to apply to a master's for computer science, and eventually a phd. However I know the admission officers eyes will bleed when they see my transcript, despite my GPA, because my school keeps ALL grades on transcripts, even if the grades were replaced by retaking classes. Do I still have a chance at top-10 graduate school for computer science even with these grades (which were retaken and then aced)?
_I know the admission officers eyes will bleed_ — First, graduate schools in the US typically don't have "admissions officers"; admissions committees are composed of _faculty_. Second, nobody's eyes are going to bleed over a couple of Fs that you later turned into As; the most likely reaction is "Huh? Oh, wow!!"
Why do you care so much about grades? From my experience (employers in Europe) do not care if I aced math or whatever, they care about what I can do with it... I read you want phd and I have no clue how grades affect that.
I also think this is more of a "Wow!" thing. You don't give up hope. That is a good sign.
The impression I get from the replies is that it's still likely to be detrimental (how much so, I don't know). I'm tired enough of applicants typically trying to blend in with the flock that I'd not only overlook such a so-called blemish but in fact give OP brownie points were I in a position to do so. It's really too bad so many people outright refuse to not count or to ignore something and feel compelled to take each thing into account in the same formulaic manner and have it have some effect on the bottom line, unconditionally, no matter what.
In my (rather extensive) experience with graduate admissions, admissions committees understand that people have semesters in which life interferes with school. If you've retaken the classes and received high marks in them, this very clearly signals that something was interfering with your performance during those two semesters and that the bad grades have nothing to do with your underlying ability. Those grades won't go unnoticed -- but nor will they hurt you the way they would had you not repeated and aced those courses.
It would help further if you have a trusted mentor who could mention and--to the degree that you comfortable, explain--this issue in his or her letter of recommendation.
Don't count on cruising through the application process, but also don't lower your ambitions based on these grades.