The key thing to understand about martial law is that human rights violations are not a sad accident. While in the best case they are not the main intent, they are nonetheless an accepted cost.
Like chemotherapy that is basically drinking poison in the hopes that it kills the cancer before it kills you, martial law hopes to harm the rebels/terrorists/criminals far more than it harms innocent people. When the tool involves the suspension of the mechanisms that are meant to favor the protection of the innocent even at the cost of freeing the guilty, it is guaranteed to harm or even kill innocent people. That's the whole point of the tool.
This is why martial law must be used as an absolute last resort, and as narrowly as possible. You wouldn't want a doctor who prescribes chemotherapy for a nasty cold, and you do not want a president who jokes about soldiers raping people when he declares martial law.