Skip to content

Add GUI #243

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dpascualhe opened this issue Dec 10, 2024 · 18 comments
Open

Add GUI #243

dpascualhe opened this issue Dec 10, 2024 · 18 comments

Comments

@dpascualhe
Copy link
Collaborator

As of now, DetectionMetrics can only be used as a Python library. Add a simple GUI for easier interaction, selecting models and datasets to evaluate, and inspecting datasets and results.

@obamwonyi
Copy link

I will like to pick this up.

@dpascualhe
Copy link
Collaborator Author

Hi @obamwonyi , thanks for you interest! 😄

How do you plan to tackle this down? It might be a big chunk of work, what would be your first steps?

@obamwonyi
Copy link

I was thinking with React + Django, and may be websockets for real time updates just like they currently have with Robotics academy.

@obamwonyi
Copy link

It can be a separate Project that integrates DetectionMatrics as a library and makes the necessary actions based on user interactions. Frontend interacts with the backend through API endpoints. and we can simply work with Direction metrics through simple imports, we can also create separate apps in the project to handle separate functions, each app with its own endpoint in it's urls.py files.

@obamwonyi
Copy link

Hi @dpascualhe. I hope you are fine. I would love feedback on my suggested approach if you don't mind.

@rudrakatkar
Copy link
Contributor

Hello @dpascualhe 👋,

I'd like to work on this issue by developing a simple but interactive GUI for the DetectionMetrics tool. This interface will allow users to interactively:

  • Select pre-trained models (e.g., ONNX format)
  • Choose a dataset folder
  • Configure thresholds like confidence and IoU
  • Run evaluations and visualize detection metrics (mAP, precision, recall, etc.)

I plan to use Tkinter for building the GUI and the core functionalities will be:

  • Model Loader
  • Dataset Selector
  • Run Evaluation
  • Threshold Inputs
  • Result Viewer

Let me know if this plan sounds good, I can start with a basic version and iteratively improve it.
Thanks! 🚀

@obamwonyi
Copy link

Hi, @rudrakatkar, glad to know you are interested in this task. It pretty been waiting long; you seem to be more familiar with the machine learning aspect of things. I do have basic knowledge of it, but no working experience yet. would love to make the implementations with you if you don't mind. Can you let me know what exact language the implementation is based on?

@rudrakatkar
Copy link
Contributor

That's great to hear, and I would love to collaborate with you on this! And don't worry at all; I'd be happy to work with you and share anything I can about the ML side of things.

Since DetectionMetrics is already structured in Python, we will continue to use it for both the GUI (using Tkinter) and the backend of the implementation, which is fully in Python.

I'll begin assembling a basic graphical user interface (GUI) structure with buttons and inputs for choosing and assessing models and datasets. Together, we can combine that with your suggestions, connect it to the reasoning behind the evaluation, and visualize the outcomes!

Let me know what you think @dpascualhe

@obamwonyi
Copy link

Thanks, @rudrakatkar. Can you share a documentation of Tkinter with me so I can familiarize myself with it please?

@rudrakatkar
Copy link
Contributor

You're very welcome, @obamwonyi!
Here’s the official Python Tkinter documentation to get you started:
link

@jayzalani
Copy link
Contributor

Hi! @obamwonyi and @rudrakatkar I did like to point out here something firstly that @rudrakatkar has given some good high level overview of how GUI will look like although I noticed some problem here Tkinter is an desktop-only application building framework, so handling it through various different os will be quite complex, and apart from this it has very limited ui component flexiblity and less ml specific component, although this framework is usefull if we have highly tight deployment constraint which is not the case (ig) 😅here, i would like to suggest using streamlit or gradio or flask apart from this if still wanted to build desktop based application i would suggest to go with more modern framewoks like pyQT or if possible electron with python as core backend.

@rudrakatkar
Copy link
Contributor

Hi @jayzalani,
Thanks for pointing this out I really appreciate the feedback!

You're totally right Tkinter has limitations when it comes to cross-platform consistency and UI flexibility, especially for ML-specific visualization components. I initially chose it for its simplicity and quick prototyping capability especially with its grid mechanism (pretty old school, I know! 😅). But I agree it’s not the best long-term choice.

I’m open to switching to a more robust solution like Streamlit, Gradio, or even Flask, especially since this tool is likely to be used by researchers or practitioners who’d benefit more from a browser-based interface.

That said, since I have solid experience with Tkinter, I’ll start by building a basic working version with it just to get the logic in place. Then I’ll switch over to Streamlit for a more modern and user-friendly experience (definitely the easiest option available).

Thanks again for your insight it’s great to have this kind of collaboration!

@dpascualhe
Copy link
Collaborator Author

Hi 👋 Great to see so much interaction!

As @jayzalani pointed out, I think the best choice for now is to avoid overly complex solutions (like React + Django) while maintaining good compatibility across different operating systems (in that sense, TKinter and PyQt could pose some issues). Modern web-based tools like Gradio and Streamlit seem like a good fit. Plus, they allow for rapid prototyping, which is important given the current stage.

@rudrakatkar
Copy link
Contributor

Hi @dpascualhe,
Thankyou for the feedback totally agreed with you!

Given the pros of browser based tools, I’ll proceed with Streamlit instead of Tkinter. It’s lightweight, OS-independent, and perfect for quick ML prototyping. I’ll start with a basic version that lets users:

  • Select models and datasets
  • Set thresholds
  • Run evaluations
  • View mAP, precision, and recall results

Excited to move forward with this!

@obamwonyi
Copy link

Hi, @rudrakatkar. I mailed him, I think he is more likely to respond when you mail him. hope you are ok with this @dpascualhe ?

@dpascualhe
Copy link
Collaborator Author

Hello @rudrakatkar @obamwonyi 👋

  • Select models and datasets
  • Set thresholds
  • Run evaluations
  • View mAP, precision, and recall results

Beware, object detection is not implemented yet. I would start with: dataset visualization and evaluation for image segmentation.

Hi, @rudrakatkar. I mailed him, I think he is more likely to respond when you mail him. hope you are ok with this @dpascualhe ?

I'd rather keep technical discussions on Github so that we can all interact openly.

@obamwonyi
Copy link

Hello @rudrakatkar @obamwonyi 👋

  • Select models and datasets
  • Set thresholds
  • Run evaluations
  • View mAP, precision, and recall results

Beware, object detection is not implemented yet. I would start with: dataset visualization and evaluation for image segmentation.

Hi, @rudrakatkar. I mailed him, I think he is more likely to respond when you mail him. hope you are ok with this @dpascualhe ?

I'd rather keep technical discussions on Github so that we can all interact openly.

Ok

@obamwonyi
Copy link

Hi, I am going to start making my own progress as I don't think others are still interested. I will keep you ( @dpascualhe ) posted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants