Skip to content
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

Add C++ demos (Updated on 2024-03-06) #135

Open
fengyuentau opened this issue Feb 22, 2023 · 20 comments
Open

Add C++ demos (Updated on 2024-03-06) #135

fengyuentau opened this issue Feb 22, 2023 · 20 comments
Assignees
Labels
demo anything related to demo in Python / C++ feature New feature or request

Comments

@fengyuentau
Copy link
Member

fengyuentau commented Feb 22, 2023

We have provided at least one easy and clean Python demo for every model here in the zoo. As described in #132, Python demos sometimes can be too concise to be converted to other languages, such as C++. Hence, we decide to add C++ demos as well but they should be clean and simple enough to show how to run inference and get expected output with OpenCV.

We welcome contributions from community. Please take a look at the list below and leave comments for application or discussion before you start to dive in coding.

Status Task Models
✅ Done #138 Face Detection YuNet
❗️ Need Contribution Face Recognition SFace
✅ Done #177 Object Detection YOLOX
✅ Done #232 Object Detection NanoDet
✅ Done #175 Text Detection DB
✅ Done #176 Text Recognition CRNN (CN)
✅ Done #176 Text Recognition CRNN (EN)
✅ Done #176 Text Recognition CRNN (CH)
✅ Done #241 Image Classification PP-ResNet50
✅ Done #171 Image Classification MobileNet V1
✅ Done #171 Image Classification MobileNet V2
✅ Done #243 Human Segmentation PP-HumanSeg
❗️ Need Contribution QR Code Detection / Parsing WeChatQRCode
❗️ Need Contribution Person Re-Identification YoutuReID
❗️ Need Contribution Palm Detection MP-PalmDet
❗️ Need Contribution Hand Pose Estimation MP-HandPose
✅ Done #179 Person Detection MP-PersonDet
✅ Done #186 Pose Estimation MP-Pose
✅ Done #233 Facial Expression Recognition FER
✅ Done #240 Object Tracking VitTrack
@fengyuentau fengyuentau self-assigned this Feb 22, 2023
@fengyuentau fengyuentau added feature New feature or request demo anything related to demo in Python / C++ labels Feb 22, 2023
@fengyuentau fengyuentau pinned this issue Feb 22, 2023
@kekxv
Copy link

kekxv commented Mar 16, 2023

handpose_estimation_mediapipe. please
Thank you so much.

@dmatveev
Copy link

If we revive DNN backend in G-API, it may make sense to write the C++ demos directly in G-API to combine Video, NN, Pre&Post processing all in the same pipeline effectively. Additional points to OpenCV as an application framework. What do you think?

cc: @vpisarev

@fengyuentau
Copy link
Member Author

It would be good to provide additional demos in G-API to construct a complete end-to-end pipeline. But first we need to have DNN backend in G-API, which is not implemented yet right?

cc @ShiqiYu

@LaurentBerger
Copy link
Contributor

@fengyuentau I can manage MobileNet V1 Are you agree?

@fengyuentau
Copy link
Member Author

@LaurentBerger No problems. Pull requests are welcome.

@LaurentBerger
Copy link
Contributor

About DaSiamRPN there is already an example Model source: opencv/samples/dnn/diasiamrpn_tracker.cpp

@fengyuentau
Copy link
Member Author

About DaSiamRPN there is already an example Model source: opencv/samples/dnn/diasiamrpn_tracker.cpp

Yes, but we are going to replace it. We have two GSoC projects ongoing for training a better but also lighter object trackers.

@LaurentBerger
Copy link
Contributor

Yes, but we are going to replace it. We have two GSoC projects ongoing for training a better but also lighter object trackers.

May be it should be mark as in progress

@fengyuentau fengyuentau changed the title Add C++ demos for models in the zoo Add C++ demos (Updated on 2023-11-07) Nov 7, 2023
@LaurentBerger
Copy link
Contributor

LaurentBerger commented Dec 13, 2023

@ryan1288
Copy link
Contributor

Hello @fengyuentau , I'm relatively new to open-sourced contributions but I'd love to start contributing to OpenCV / OpenCV-Zoo. I have experience in C++ and Python, applied to ML/CV/Robotics. Are these demos a good starting point for me? Or are there simpler projects that you recommend I get started with?
Is it safe to assume that the corresponding task from #119 needs to be completed before the demo?

@fengyuentau
Copy link
Member Author

@ryan1288 They can be done in parallel. You are welcome to do whatever you are interested in.

@DaniAffCH
Copy link
Contributor

DaniAffCH commented Feb 23, 2024

Can I take Facial Expression Recognition? Is there anyone who is already working on it? @fengyuentau

@fengyuentau
Copy link
Member Author

Can I take Facial Expression Recognition? Is there anyone who is already working on it? @fengyuentau

Sure you can. Feel free to submit PR :)

@ryan1288
Copy link
Contributor

ryan1288 commented Feb 24, 2024

@fengyuentau Put up my first draft PR in for this Issue! PR #232 - C++ Demo - Object Detection (NanoDet)

I'm excited to start working on these projects and more 😄. Before I started working on that PR, I played with all the Python and C++ demos from opencv_zoo. I have several thoughts on possible small improvements:

  • Object Detection YOLOX
    • demo.cpp
      • Spelling mistakes on line 285
      • Option to save but has no saving functionality
  • Object Detection NanoDet
    • demo.py - spelling mistake on line 151
  • Object Tracking VitTrack
    • demo.py
      • assert cv.__version__ > "4.9.0" should be assert cv.__version__ >= "4.9.0"
      • No space between text and upper tracking box border
  • Optical Flow Estimation Raft
    • demo.py - assert cv.__version__ > "4.9.0" should be assert cv.__version__ >= "4.9.0"
  • Image Classification (MobileNet and PPResNet)
    • Could use better documentation README by adding example classifications & providing a link to the class list
  • A bunch of models (such as Object detection - YOLOX)
    • The image cv::Mat from cap.open(image_path) is different from imread(image_path), which causes small differences inthe outputs between the Python and C++ demos. I encountered a similar problem when converting Python to C++ for NanoDet.

From C++ Demo for YOLOX
image
From Python Demo for YOLOX
image

  • Text Detection PPOCR
    • Errors in C++ demo when running ./build/opencv_zoo_text_detection_ppocr -i=../text.jpg when python3 demo.py --input ../text.jpg -v works
      image
  • Text Recognition CRNN
    • Errors in C++ demo when running ./build/opencv_zoo_text_recognition_crnn --input ../text.jpg when python3 demo.py --input ../text.jpg -v works
      image

I think there were more but these are the ones I remember. If these seem like reasonable problems to fix, I'll go work on them and put up some small PRs!

@fengyuentau fengyuentau changed the title Add C++ demos (Updated on 2023-11-07) Add C++ demos (Updated on 2024-02-26) Feb 26, 2024
@fengyuentau
Copy link
Member Author

@ryan1288 Hi, thank you for trying out our demos and the detailed investigation! True indeed there are some problems as you found. It would be really helpful if you would like to create several PRs to resolve them.

@ryan1288
Copy link
Contributor

ryan1288 commented Mar 2, 2024

@fengyuentau I'm planning to work on the TrackerVIT C++ demo as well. Should be able to produce a much cleaner solution now that I have a better grasp of it 👍

@DaniAffCH
Copy link
Contributor

DaniAffCH commented Mar 6, 2024

Hey there, I'm going to work on Human Segmentation

@fengyuentau
Copy link
Member Author

Hello @DaniAffCH , feel free to submit pull requests!

@fengyuentau fengyuentau changed the title Add C++ demos (Updated on 2024-02-26) Add C++ demos (Updated on 2024-03-06) Mar 6, 2024
@ryan1288
Copy link
Contributor

ryan1288 commented Apr 5, 2024

Hello @fengyuentau I'm interested in the palm detection demo. Is it alright if I work on it?

@fengyuentau
Copy link
Member Author

Hello @fengyuentau I'm interested in the palm detection demo. Is it alright if I work on it?

Hi, sure you can work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
demo anything related to demo in Python / C++ feature New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants