Comments (4)
Hi @takuya-takeuchi,
I replaced the manual calculation with the Pyramid Down usage, and it works perfectly.
Thanks for your help :)
from dlibdotnet.
@joao-sgoncalves
Good.
I understand what you are saying.
We should reproject coordinates from upsampled ones.
I want to use same interface with Python. So let me check and please give me time to investigate more further.
Thanks.
from dlibdotnet.
Ok, thanks for your help @takuya-takeuchi :)
from dlibdotnet.
@joao-sgoncalves
I forgot usage of DlibDotNet :(
You need not to adjust returned points manually.
You can do the following steps
static void Main(string[] args)
{
using var original = Dlib.LoadBmp<RgbPixel>("Lenna.bmp");
using var image = Dlib.LoadBmp<RgbPixel>("Lenna.bmp");
using var faceDetector = Dlib.GetFrontalFaceDetector();
using var pyr = new PyramidDown(2);
var upsamplingAmount = 1;
var levels = upsamplingAmount;
while (levels > 0)
{
levels--;
Dlib.PyramidUp(image);
}
var rects = faceDetector.Operator(image);
foreach (var rectangle in rects)
Dlib.DrawRectangle(original, rectangle, new RgbPixel(255, 0, 0));
foreach (var t in rects)
{
var rect = pyr.RectDown(t, (uint)upsamplingAmount);
Dlib.DrawRectangle(original, rect, new RgbPixel(0, 255, 0));
}
Dlib.SavePng(original, "result.png");
}
Thanks.
from dlibdotnet.
Related Issues (20)
- create detector issue HOT 4
- Set minimum sensitivity for FrontalFaceDetector.Operator HOT 3
- Add CUDA 112 to document and publish script
- library does not depend on system libjpeg on OSX HOT 2
- How to using in .NET Core 6 HOT 1
- [Memory Leak] Disposing an Array2D<RgbPixel> does not dispose of contained RgbPixels HOT 11
- BitmapExtensions.ToArray2D<RgbPixel>(image) throws always not supported exception HOT 4
- Rid of System.Drawing
- cuda HOT 4
- DlibDotNet.Xamarin is missing HOT 1
- ToBitmap() ambigous HOT 1
- Memory leak with Array2D HOT 2
- DlibDotNet with FaceRecognitionDotNet Not working HOT 1
- Face recognition in real time (using ar glass and unity and dlibdotnet)
- .NET 7.0 compatibility, Failed to find dll "DlibDotNetNative", for processor architecture AMD64 HOT 2
- Can't load DlibDotNetNativeDnn in Blazor WebAssembly project
- HeadPoseTraining with GPU Support possible ?
- Can't build DlibDotNet.Native.Dnn HOT 1
- External component throws an error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlibdotnet.