Can't speak to the Marine side of things, but have a lot to say about the Army side.
First of all, you don't receive a commission into any specific branch. You're commissioned as an Army Officer. Once you accept your commission you attend BCT, then OCS. At OCS, you receive your branch (Infantry, Army, Engineering, etc). These days, the biggest factor in what you branch is where you fall on the OCS order of merit list. It's a little different now than when I went through, but as I understand the new setup: At OCS, you'll earn points for a large majority of the tasks you'll do there (INCLUDING PT). The guy with the most points gets to pick his branch first, the second most points picks next, and so on and so forth. There may only be a couple of slots available in infantry, so the higher up the list you are, the better chance you'll have of getting your top choice.
Ask yourself WHY you want to serve in the infantry. Can you get the same things elsewhere? Are you okay with multiple deployments and a lot of time away from home/at training exercises? You're 'gonna get a lot of chances to go to the Army's high-speed, Hooah-type schools. This is a lot of time away from home, too. But DON'T EVER pass up an opportunity to do so. If you're okay with all of this, here's a few other things to consider ...
There is A LOT of crap that infantry lieutenants have to eat. Nobody, and I mean NOBODY, will respect you when you get to your first duty station. Not your superior officers, not your men. You'll have to earn that. Coming in and telling them how you 'don't take no crap' is only gonna get you laughed at. No joke, I've seen plenty of Officers succeed or fail based on their first impression to their platoon. At the same time you're earning that respect, you'll be tasked with leading a platoon and "making it work". You'll also spend a decent amount of time behind a desk. There's a lot of gear to keep track of, and a lot of paperwork that the Bn/Co needs to finish up. Guess who gets to handle that? You'll also have to handle stuff like some dumb private going all Rambo in the local bar and getting arrested.
Not trying to dissuade you. Just trying to show you the day-to-day as an infantry officer. It's a tough job with a lot of responsibility. It has some pretty cool moments, though. Keep your eyes wide open to the realities of the thing, and be honest with yourself about whether you can deal with them. If you can, contact your local recruiter and get started applying to OCS.
Also, if you are job locked into the infantry, perhaps you should consider enlisting? Not necessarily the best idea, but it's the only way to guarantee your branch/job from the Army. OCS offers a high probability of getting that job if you can PT well and study hard, but it's still not a sure-thing.