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

Ошибка TypeError: train() got an unexpected keyword argument 'class attribute name' #77

Closed
romanjkeey opened this issue Jun 1, 2020 · 1 comment

Comments

@romanjkeey
Copy link

Здравствуйте. Вроде следую по инструкции. Но на строке
nnet.train(class_attribute_name="class") #nnet.loadModel(MASK_RCNN_MODEL_PATH)

Выходит ошибка TypeError: train() got an unexpected keyword argument 'class attribute name'

`import os
import cv2
import numpy as np
import sys
import json
import matplotlib.image as mpimg
from matplotlib import pyplot as plt
import warnings
warnings.filterwarnings('ignore')

NOMEROFF_NET_DIR = os.path.abspath('C:/Users/ZhuravlevRS/work/datasets/ocr/nomeroff-net-master')
sys.path.append(NOMEROFF_NET_DIR)

specify the path to Mask_RCNN if you placed it outside Nomeroff-net project

MASK_RCNN_DIR = os.path.join(NOMEROFF_NET_DIR, 'Mask_RCNN')
MASK_RCNN_LOG_DIR = os.path.join(NOMEROFF_NET_DIR, "logs")

DATASET_NAME = "mrcnn"
VERSION = "2019_09_18"
MASK_RCNN_FROZEN_PATH = os.path.join(NOMEROFF_NET_DIR, "models/", 'numberplate_{}_{}.pb'.format(DATASET_NAME, VERSION))`

`# Import license plate recognition tools.
from NomeroffNet import Detector
from NomeroffNet.Base import convert_keras_to_freeze_pb

CONFIG = {
"GPU_COUNT": 1,
"IMAGES_PER_GPU": 1,
"WEIGHTS": "coco",
"EPOCHS": 100,
"CLASS_NAMES": ["BG", "numberplate"],
"NAME": "numberplate",
"DATASET_DIR": "C:/Users/ZhuravlevRS/work/datasets/ocr/mrcnn",
"LAYERS": "all",
"NUM_CLASSES": 2
}

Initialize npdetector with default configuration file.

nnet = Detector(MASK_RCNN_DIR, MASK_RCNN_LOG_DIR, CONFIG)`

@dimabendera
Copy link
Member

try use

nnet.train() 

instanse

nnet.train(class_attribute_name="class")

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

No branches or pull requests

2 participants