0

I가 다음과 같은 IBM 왓슨 시각 인식 파이썬 SDK를 실패IBM 시각적 인식 분류 상태는 간단한 분류를 만드는

with open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as dogs, \ 
    open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as cats: 
    print(json.dumps(visual_recognition.create_classifier('Dogs Vs Cats',dogs_positive_examples=dogs,negative_examples=cats), indent=2)) 

새로운 분류 ID와 응답 및 상태는 다음과 같다 :

{ 
    "status": "training", 
    "name": "Dogs Vs Cats", 
    "created": "2016-06-23T06:30:00.115Z", 
    "classes": [ 
    { 
     "class": "dogs" 
    } 
    ], 
    "owner": "840ad7db-1e17-47bd-9961-fc43f35d2ad0", 
    "classifier_id": "DogsVsCats_250748237" 
} 

교육 상태가 실패로 표시됩니다.

인쇄 (json.dumps (visual_recognition.list_classifiers(), 들여 쓰기 = 4))

{ 
    "classifiers": [ 
     { 
      "status": "failed", 
      "classifier_id": "DogsVsCats_250748237", 
      "name": "Dogs Vs Cats" 
     } 
    ] 
} 

이의 원인은 무엇입니까?

+0

우편에 이미지가 있는지 확인하십시오. 터미널을 열면'unzip '을 사용하여 zip 파일 내용을 볼 수 있습니다. –

답변

1
with open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as dogs, \ 
    open(os.path.dirname("/home/xxx/Desktop/Husky.zip/"), 'rb') as cats: 
    print(json.dumps(visual_recognition.create_classifier('Dogs Vs Cats',dogs_positive_examples=dogs,negative_examples=cats), indent=2)) 

참조 동일한 파일 내용 "Husky.zip"서비스는 양수 및 부정적인 예. 그러나이 시스템은 적어도 10 개의 긍정적 인 예와 10 개의 부정적인 예제 이미지가 필요합니다 (). 이 서비스는 교육 전에 이미지 파일 내용의 해시 코드를 비교하고 양수 세트에만 중복 된 사본을 남깁니다. 따라서 중복 제거 후에도 네거티브 세트가 비어있어 교육 실패로 이어집니다. 이것이 문제 일 수 있다고 말하는 분 류자 세부 정보의 자세한 목록에는 "설명"이라는 추가 필드가 있어야합니다.

1

훈련 통화 및 데이터의 크기 제한이 있습니다

분류 호출에 대한
The service accepts a maximum of 10,000 images or 100 MB per .zip file 

The service requires a minimum of 10 images per .zip file. 

The service accepts a maximum of 256 MB per training call. 

은 크기 제한이 있습니다

The POST /v3/classify methods accept a maximum of 20 images per batch. 

The POST /v3/detect_faces methods accept a maximum of 15 images per batch. 

The POST /v3/recognize_text methods accept a maximum of 10 images per batch. 

당신은을 보내는 http://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/visual-recognition/customizing.shtml