How to Implement Comparators (Greater than, Less than, Equal to) for your Python Classes
As you build applications that get fairly large in python, you will typically have to write classes that encapsulate functions, data classes that specify data values for or interface for exchanging data etc. In many cases you will want to also check things like equality, and if how things compare. For example, consider I have a dataclass for representing docuemnts ...
Each data class is used in representing data which is also persisited to a database
But each time I createa new Document, I want to know if it already exists. Now the id is
Review TLDR;
Its pretty remarkable what has been accomplished here. Future work might benefit from:
Efforts to definitely would benefit from further optimizing for latency while maintaining fine grained segmentation (e.g. using residual U-blocks as proposed in the U2Net Paper. This might lead to usable FPS values on commodity CPU machines.
Efforts to optimize for usability by elmininating the background image requirement. E.g. by reframing the ML problem, we can train the network to jointly predict the background (image completion) in addition to the alpha matte values, and leverage this knowledge in predicting better matte values. Ideally, this formulation will utilize background images (as labels) during training but not require them during inference.
Overall, well written paper and well produced video explaining their work.
I will be updating this post as I experiment with the model itself.
References
[^1]: Lin, S., Ryabtsev, A., Sengupta, S., Curless, B., Seitz, S., & Kemelmacher-Shlizerman, I. (2020). Real-Time High-Resolution Background Matting. arXiv preprint arXiv:2012.07810. CVPR 2021.