Applications of Markov Random Field Optimization and 3D Neural Network Pruning in Computer Vision