1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-31 00:03:03 +04:00

Merge pull request #25519 from gursimarsingh:improved_classification_sample

Improved classification sample #25519

#25006 #25314

This pull requests replaces the caffe model for classification with onnx versions. It also adds resnet in model.yml. 

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Gursimar Singh
2024-08-06 11:46:11 +05:30
committed by GitHub
parent 3dcc8c38b4
commit 35eba9ca90
7 changed files with 493 additions and 240 deletions
+4 -3
View File
@@ -1404,10 +1404,11 @@ Point FontRenderEngine::putText_(
if (weight != 0)
for(j = 0; j <= BUILTIN_FONTS_NUM; j++)
{
int params[] = {STBTT_FOURCC('w', 'g', 'h', 't'), saved_weights[j]};
font_t* ttface = (j < BUILTIN_FONTS_NUM ? builtin_ffaces[j] : fontface)->ttface;
if (ttface)
stbtt_SetInstance(ttface, params, 1, 0);
if (!ttface || stbtt_GetWeight(ttface) == saved_weights[j])
continue;
int params[] = {STBTT_FOURCC('w', 'g', 'h', 't'), saved_weights[j]};
stbtt_SetInstance(ttface, params, 1, 0);
}
return pen;