There is the gerund/participle ambiguity here.
You can have a participle phrase "doing that crime" modifying the pronoun "me" (which should be in object form as it is the object of the verb "imagine").
Or there can be a gerund phrase in which case the object of "imagine" is the gerund "doing", with subject "my" (because gerunds have their subjects in possessive form)
There could be a slight difference in meaning: in the first case the thing that one imagines is "me" (a person), in the second case, the thing that is imagined is the act of "doing".
But at a higher level, imagining a person who is doing a crime, has the same general sense of imagining a crime being done by a person. The picture in your mind is the same.
So there is the gerund/participle ambiguity. It can be functionally impossible to decide whether "doing" is a participle or gerund. Even the clue that "me" or "my" gives isn't certain, since the meanings are the same, at some high level.
It is more common and more straightforward to use the participle form "me doing the crime". This is much more common.
However "I doing the crime" is grammatically incorrect, no matter how you parse the sentence.