# PyGraphicsGui for Human-in-the-Loop Machine Learning

- Speaker: [Dalya Gartzman](/wiki/speakers/dalya-gartzman.md)
- Event: [Reversim Summit 2020](/wiki/years/2020.md)
- Video: https://www.youtube.com/watch?v=v_T4SrODHTw
- Transcript: [/transcripts/2020/10-v_T4SrODHTw.md](/transcripts/2020/10-v_T4SrODHTw.md)
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: [Game Development](/wiki/topics/game-development.md), [Frontend](/wiki/topics/frontend.md), [Machine Learning](/wiki/topics/machine-learning.md), [Software Engineering](/wiki/topics/software-engineering.md)

> Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

## Summary

The speaker shares their journey of building a custom desktop application with a graphical engine in Python for human-in-the-loop machine learning workflows. When existing tools fell short, the speaker dived into computer graphics concepts like coordinate systems, transformation matrices, vertex buffers, and shaders to create a custom solution. The talk demonstrates how to integrate a modern graphics engine with a desktop user interface framework to solve specialized engineering challenges. Ultimately, the speaker encourages developers to build custom tools when off-the-shelf solutions are inadequate and to share their knowledge with the wider community.

## Key points

- [1:16](https://www.youtube.com/watch?v=v_T4SrODHTw&t=76s) The speaker successfully built a custom open-source Python desktop application with a graphical engine called PyGraphicsGui.
- [2:29](https://www.youtube.com/watch?v=v_T4SrODHTw&t=149s) Machine learning pipelines often require a human-in-the-loop process, necessitating smooth transitions between automated and manual tools.
- [7:53](https://www.youtube.com/watch?v=v_T4SrODHTw&t=473s) Computer graphics rely heavily on understanding and converting between different coordinate systems, such as texture coordinates and viewport coordinates.
- [12:10](https://www.youtube.com/watch?v=v_T4SrODHTw&t=730s) The model-view-projection matrix combines linear transformations to map abstract local object coordinates into global world and screen coordinates.
- [15:32](https://www.youtube.com/watch?v=v_T4SrODHTw&t=932s) GPUs render objects using triangles, vertex buffers, and vertex/fragment shaders rather than manipulating individual pixels manually.
- [22:53](https://www.youtube.com/watch?v=v_T4SrODHTw&t=1373s) Integrating a modern graphics engine with a standard GUI framework like Tkinter requires piping the frame buffer updates into the application window loop.
- [25:01](https://www.youtube.com/watch?v=v_T4SrODHTw&t=1501s) Custom interactive tools can significantly improve workflows in domains like audio processing, video editing, and data visualization.
- [28:09](https://www.youtube.com/watch?v=v_T4SrODHTw&t=1689s) Developers should share their specialized solutions and knowledge with the community to help others facing similar engineering roadblocks.

## Takeaways

- Learn the fundamentals of computer graphics and coordinate systems when building custom visual applications in Python.
- Use vertex buffers and shaders to efficiently communicate geometry and color data to the GPU.
- Build custom interactive tools when standard libraries or off-the-shelf applications do not meet your specific pipeline needs.

## Questions this talk answers

- How can I integrate a custom OpenGL graphics engine with a Python desktop GUI framework like Tkinter?
- What are the core computer graphics concepts needed to map abstract object coordinates to screen coordinates?
- When should an algorithm developer build a custom interactive tool instead of relying on existing libraries?

## Technologies

Python, OpenGL, Tkinter, GitHub

## Tags

computer graphics, desktop development, human in the loop, machine learning, open source, python, shaders
