Reconstructing granular particles from X-ray computed tomography using the TWS machine learning tool and the level set method