Enhancing the Accuracy of 6T SRAM-based In-Memory Architecture via Maximum Likelihood Detection