Ryan Lee
commited on
Commit
·
de9a860
1
Parent(s):
18b09e3
Fix spelling, spacing, and unused variables (#236)
Browse files* Fix spelling, spacing, and unused variables
* Fixed typo in 3 more models
* Added open back
* Remove setBackendAndTarget functions from C++ demos, which are unused functionality.
demo.cpp
CHANGED
|
@@ -46,7 +46,8 @@ public:
|
|
| 46 |
{
|
| 47 |
this->strides = { 8, 16, 32, 64 };
|
| 48 |
this->net = readNet(modelPath);
|
| 49 |
-
|
|
|
|
| 50 |
this->project = Mat::zeros(1, this->regMax + 1, CV_32F);
|
| 51 |
for (size_t i = 0; i <= this->regMax; ++i)
|
| 52 |
{
|
|
@@ -57,12 +58,6 @@ public:
|
|
| 57 |
this->generateAnchors();
|
| 58 |
}
|
| 59 |
|
| 60 |
-
void setBackendAndTarget(Backend bId, Target tId)
|
| 61 |
-
{
|
| 62 |
-
this->net.setPreferableBackend(bId);
|
| 63 |
-
this->net.setPreferableTarget(tId);
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
Mat preProcess(const Mat& inputImage)
|
| 67 |
{
|
| 68 |
Image2BlobParams paramNanodet;
|
|
|
|
| 46 |
{
|
| 47 |
this->strides = { 8, 16, 32, 64 };
|
| 48 |
this->net = readNet(modelPath);
|
| 49 |
+
this->net.setPreferableBackend(bId);
|
| 50 |
+
this->net.setPreferableTarget(tId);
|
| 51 |
this->project = Mat::zeros(1, this->regMax + 1, CV_32F);
|
| 52 |
for (size_t i = 0; i <= this->regMax; ++i)
|
| 53 |
{
|
|
|
|
| 58 |
this->generateAnchors();
|
| 59 |
}
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
Mat preProcess(const Mat& inputImage)
|
| 62 |
{
|
| 63 |
Image2BlobParams paramNanodet;
|
demo.py
CHANGED
|
@@ -148,7 +148,7 @@ if __name__=='__main__':
|
|
| 148 |
img = vis(preds, image, letterbox_scale)
|
| 149 |
|
| 150 |
if args.save:
|
| 151 |
-
print('
|
| 152 |
cv.imwrite('result.jpg', img)
|
| 153 |
|
| 154 |
if args.vis:
|
|
|
|
| 148 |
img = vis(preds, image, letterbox_scale)
|
| 149 |
|
| 150 |
if args.save:
|
| 151 |
+
print('Results saved to result.jpg\n')
|
| 152 |
cv.imwrite('result.jpg', img)
|
| 153 |
|
| 154 |
if args.vis:
|