
One huge component we could fix is to reduce the amount of reslicing that takes place on the Go side. We started implementing this before we ran out of time and already have seen a double-digit performance increase. With about a day's more time, we would’ve had time to create a feedback loop into our Golang implementation which we think would’ve increased the accuracy by ~10%. What’s next? What improvements could be made? In addition, we also learned valuable team-building and collaboration skills. Our group collectively gained experience in Go and Python as well as many Python libraries including TensorFlow, NumPy, pandas, etc. This is incredible especially given our Runtime is about 30 seconds per 50,000 images in Go. We're proud of the high degree of accuracy we were able to attain using our custom algorithm and our accuracy to runtime ratio on our Go Algorithmic Solution.Īt peak performance, our Neural Network performs with just over 90% accuracy on the training data while our go function performs at around 85% accuracy. This allowed us to leverage all cores (up to 24 because there were 24 folders) on the server running our solution making ours stand out in real-world application, however, concurrency has its quirks and can sometimes be hard to align timing however by use of WaitGroups we were able to ensure all threads were handled by the Go Scheduler correctly.

We overcame this challenge by employing concurrency. One difficulty we encountered was optimizing the runtime in Go.
NN SEQUENTIAL GRAYSCALE CODE
Our greatest challenge proved to be deploying our hybrid codebase, in the end, we ended up compiling the Go code on the submission server and running it directly from python while passing in the file path as a command line argument. The neural network helped us to optimize the heuristic and make corrections, thus improving the prediction accuracy across the entire dataset. Following this, we optimized our heuristic using a neural network developed in python. Under normal circumstances, this task would have taken hours, however, our group used Golang to perform these operations concurrently across the entire dataset (~50,000 images) in less than 40 seconds. Our group started by developing a heuristic algorithm that matched pixel edges by utilizing standard deviation, matrix multiplication, pixel manipulation, and other data clustering techniques. Utilizing these metrics, we were able to match the edges of the given image to determine its proper orientation.Īdditionally, we have a machine learning model trained on these edge weights that can take the edges and predict the most likely orientation for the unscrambled image with a high degree of accuracy. Our heuristic algorithm in Go can rapidly compare entire edges using standard deviation in tandem with a grayscale difference function. Our system can unscramble 2x2 image puzzles by analyzing patterns in the edges of each image segment.
