hi khadas team,
what is the constant number 840 in line 252 of the below source code?
// Copyright (c) 2021 by Rockchip Electronics Co., Ltd. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*-------------------------------------------
Includes
-------------------------------------------*/
#include <dlfcn.h>
#include <stdio.h>
#include <stdlib.h>
This file has been truncated. show original
numbqq
August 21, 2024, 12:31am
2
Hello @aliliaei
@Louis-Cheng-Liu will help you later.
Hello @aliliaei ,
This is the padding size of input image.
YOLOv8 input size is 640×640, so whatever your image size, you must resize image to 640×640. For this reason, there are two way to resize.
First, resize image directly.
It is easy for preprocess and postprocess. However it makes objects deform.
Second, padding image to square first and then resize.
It keeps objects in its original shape. But it makes objects smaller.
I suggest you test both two ways and then choose more accurate one to use.
Thank you very much.
So 840 = 1920 - 1080
It depends on image size. It should be a variable like below:
int paddingSize = orig_img.cols - orig_img.rows;