A robust machine learning (ML) workflow was developed to identify kerogen and hydrocarbon storage and transport pathways in the scanning electron microscopy (SEM) maps of organic-rich shale samples from two different formations, namely Wolfcamp Shale and Barnett Shale. Kerogen is most often wrongly identified as pores/cracks are poor when the machine learning model is developed on one shale formation and applied on the other shale formation. ML workflow developed only on Barnett shale cannot detect cracks in the Wolfcamp samples. The best performing machine learning approach learnt from both the formations and exhibits an average F1 scores of 0.99 and 0.91 on the inner-region and outer-region pixels, respectively. The machine learning workflow performs better on Barnett as compared to Wolfcamp. Barnett shale, in comparison to Wolfcamp shale, provides better generalizable features and more complex microstructural aspects that are harder to 2 identify. Overall, it is easier to identify kerogen as compared to pores and cracks due to their distribution, availability, connectivity, and pixel intensity. By learning from merely 50 thousand pixels with corresponding labels, the proposed machine learning workflow can successfully identify the hydrocarbon storage and transport pathways and kerogen in a large 20-GB dataset containing approximately 10 billion pixels.