Japanese civilians in Hiroshima and Nagasaki were gravely warned to leave the city days prior to the A-bombings.
The U.S. had dropped leaflets on two cities a few days prior to the A-bombings of Hiroshima warning civilians of air raids within a few days and advised them to leave the city immediately. They did not leave so you chose to put yourself and your families at risk of bombs being dropped on your head. If you don't believe me, then Google "America warned Hiroshima".
And Pickle, Japanese planes also shot American civilians at Pearl Harbor and killed directly over 68 so it's not just soldiers and marines. Not to mention the attack on Pearl Harbor was done without a declaration of war and without a warning so it's not acceptable by any means to kill non-war people (soldiers and civilians) out of nowhere, thus placing Japan in violation of peace.
Hiroshima and Nagasaki had tens of thousands Japanese soldiers, plus both cities had military / industrial installations and were protected by anti-aircraft defense batteries in case if hundreds of B-29s would come in to firebomb their city. It's also the Japanese fault that they placed military /industrial installations in middle of the civilian-populated areas and "innocent" people you called them were working in factories and workships producing weapons of war and last time according to the 1907 Hague Convention, civilians working in factories and workshops engaging in production of war supplies were legitimate targets.