Current preprocessing functions rely heavily on nested for loops, which significantly slow down execution. While this may work for individual images, processing an entire dataset becomes extremely time-consuming. To improve efficiency, the functions should be optimized using NumPy vectorization and broadcasting techniques, reducing computation time and making the pipeline more scalable.
Current preprocessing functions rely heavily on nested for loops, which significantly slow down execution. While this may work for individual images, processing an entire dataset becomes extremely time-consuming. To improve efficiency, the functions should be optimized using NumPy vectorization and broadcasting techniques, reducing computation time and making the pipeline more scalable.