The opening is for "deploying." The middle game is for "fighting." So the middle game begins when the fighting begins in earnest.
Think of two armies marching to a battlefield. The opening is when they "leave camp." The middle game is when they arrive on the battlefield and get down to fighting.
If there is serious "fighting" a middle game can begin as early as the seventh or eighth move. On the other hand, the openingmiddle game can begin as late as the fifteenth move or so if both sides opt for a "slow" development.