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 visualizer, datareader, pseudo-main #3

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Serebro1
Copy link

Files in gui_application folder.

dest='video_path',
default='samplevideo.mp4')
parser.add_argument('-i', '--image',
help='Path to an images',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to images

self.index += 1
img = cv.imread(img_path)
if img is None:
raise ValueError(f"Не получилось считать изображение: {img_path}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

English

parser = argparse.ArgumentParser()

parser.add_argument('-t', '--mode',
help='Mode (\'image\', \'video\', \'img-pack\')',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

img-pack

help='Path to an images',
type=str,
dest='images_path',
default="D:/SEMYON/UNN/ITLAB/DLMini/data/imgs_MOV03478")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Убрать подобные полные пути.

help='Path to a dir of layout',
type=str,
dest='dir_layout_path',
default="D:/SEMYON/UNN/ITLAB/DLMini/layout/mov03478.txt")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Аналогично.

#некоторое подобие main
def main():
args = cli_argument_parser()
reader = DataReader.create(args)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отдать в качестве параметра args.mode

pass

@staticmethod
def create(args):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mode

def create(args):
# Проверяем, чтобы метод вызывался только на уровне базового класса
if DataReader != globals().get('DataReader'):
raise TypeError("Метод 'create' может быть вызван только в классе DataReader.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Удалить

type=str,
dest='images_path',
default="D:/SEMYON/UNN/ITLAB/DLMini/data/imgs_MOV03478")
parser.add_argument('-l', '--layout',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

groudtruth

# Рисуем прямоугольник
cv.rectangle(image, (x1, y1), (x2, y2), (0, 255, 0), 2) # Зеленый прямоугольник, толщина 2
# Подписываем класс
cv.putText(image, label, (x1, y1 - 10), cv.FONT_HERSHEY_SIMPLEX, 0.5, (0, 255, 0), 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

При наличии разметки необходимо отображать и размеченные прямоугольники.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants