Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cpp/KeywordTagging/KeywordTagging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,10 +379,6 @@ bool KeywordTagging::Close() {
return true;
}

string KeywordTagging::GetDetectionType() {
return "TEXT";
}

vector<MPFGenericTrack> KeywordTagging::GetDetections(const MPFGenericJob &job) {
LOG4CXX_DEBUG(hw_logger_, "Processing \"" + job.data_uri + "\".");

Expand Down
2 changes: 0 additions & 2 deletions cpp/KeywordTagging/KeywordTagging.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ class KeywordTagging : public MPFDetectionComponent {

bool Supports(MPFDetectionDataType data_type) override;

std::string GetDetectionType() override;

private:
log4cxx::LoggerPtr hw_logger_;

Expand Down
1 change: 1 addition & 0 deletions cpp/KeywordTagging/plugin-files/descriptor/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"name": "KEYWORDTAGGING",
"description": "Performs keyword tagging.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ using namespace alpr;
using log4cxx::Logger;


//-----------------------------------------------------------------------------
/* virtual */ std::string LicensePlateTextDetection::GetDetectionType() {
return "TEXT";
}

//-----------------------------------------------------------------------------
/* virtual */ bool LicensePlateTextDetection::Init() {
//Set locale
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ class LicensePlateTextDetection : public MPF::COMPONENT::MPFImageAndVideoDetecti
*/
std::vector<MPF::COMPONENT::MPFVideoTrack> GetDetections(const MPF::COMPONENT::MPFVideoJob &job) override;

std::string GetDetectionType() override;

private:
std::vector<MPF::COMPONENT::MPFVideoTrack> GetDetectionsFromVideoCapture(
const MPF::COMPONENT::MPFVideoJob &job,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"name": "OALPR",
"description": "Detects license plate text in images and videos using the Open Automatic License Plate Recognition (OALPR) Library.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
4 changes: 0 additions & 4 deletions cpp/OcvDnnDetection/OcvDnnDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@

using namespace MPF::COMPONENT;

//-----------------------------------------------------------------------------
std::string OcvDnnDetection::GetDetectionType() {
return "CLASS";
}

//-----------------------------------------------------------------------------
bool OcvDnnDetection::Init() {
Expand Down
3 changes: 0 additions & 3 deletions cpp/OcvDnnDetection/OcvDnnDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ class OcvDnnDetection : public MPF::COMPONENT::MPFImageAndVideoDetectionComponen

std::vector<MPF::COMPONENT::MPFImageLocation> GetDetections(const MPF::COMPONENT::MPFImageJob &job) override;

std::string GetDetectionType() override;


private:

log4cxx::LoggerPtr logger_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"name": "DNNCV",
"description": "Performs object classification using the OpenCV Deep Neural Networks module.",
"actionType": "DETECTION",
"trackType": "CLASS",
"requiresCollection": {
"states": []
},
Expand Down
5 changes: 0 additions & 5 deletions cpp/OcvFaceDetection/OcvFaceDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,6 @@ using namespace MPF;
using namespace COMPONENT;



string OcvFaceDetection::GetDetectionType() {
return "FACE";
}

void OcvFaceDetection::SetModes(bool display_window, bool print_debug_info) {
imshow_on = display_window;

Expand Down
2 changes: 0 additions & 2 deletions cpp/OcvFaceDetection/OcvFaceDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ public :
bool Init() override;
bool Close() override;

std::string GetDetectionType() override;

std::vector<MPF::COMPONENT::MPFVideoTrack> GetDetections(const MPF::COMPONENT::MPFVideoJob &job) override;

std::vector<MPF::COMPONENT::MPFImageLocation> GetDetections(const MPF::COMPONENT::MPFImageJob &job) override;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"name": "FACECV",
"description": "Detects faces in images and videos using the Open Computer Vision (OCV) library.",
"actionType": "DETECTION",
"trackType": "FACE",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
5 changes: 0 additions & 5 deletions cpp/OcvYoloDetection/OcvYoloDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,6 @@ bool OcvYoloDetection::Close() {
}


std::string OcvYoloDetection::GetDetectionType() {
return "CLASS";
}


void OcvYoloDetection::InitYoloNetwork(const Properties &jobProperties, const Config &config) {
auto modelName = GetProperty(jobProperties, "MODEL_NAME", "tiny yolo");
auto modelsDirPath = GetProperty(jobProperties, "MODELS_DIR_PATH", ".");
Expand Down
2 changes: 0 additions & 2 deletions cpp/OcvYoloDetection/OcvYoloDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ class OcvYoloDetection : public MPF::COMPONENT::MPFImageAndVideoDetectionCompone

bool Close() override;

std::string GetDetectionType() override;

std::vector<MPF::COMPONENT::MPFVideoTrack> GetDetections(
const MPF::COMPONENT::MPFVideoJob &job) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"name": "OCVYOLO",
"description": "Detects objects in images and videos using the Open Computer Vision (OCV) library using Yolo.",
"actionType": "DETECTION",
"trackType": "CLASS",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
4 changes: 0 additions & 4 deletions cpp/SceneChangeDetection/SceneChangeDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ using namespace MPF::COMPONENT;
using namespace cv;


std::string SceneChangeDetection::GetDetectionType() {
return "SCENE";
}

bool SceneChangeDetection::Init() {

// Determine where the executable is running.
Expand Down
2 changes: 0 additions & 2 deletions cpp/SceneChangeDetection/SceneChangeDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ class SceneChangeDetection : public MPF::COMPONENT::MPFVideoDetectionComponentAd
std::vector<MPF::COMPONENT::MPFVideoTrack> GetDetections(
const MPF::COMPONENT::MPFVideoJob &job) override;

std::string GetDetectionType() override;

private:
log4cxx::LoggerPtr logger_;
cv::Mat dilateKernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"name" : "SCENECHANGE",
"description" : "Segments a video into scenes based on 4 detectors.",
"actionType" : "DETECTION",
"trackType": "SCENE",
"outputChangedCounter" : 1,
"requiresCollection" : {
"states" : []
Expand Down
4 changes: 0 additions & 4 deletions cpp/TesseractOCRTextDetection/TesseractOCRTextDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,6 @@ bool TesseractOCRTextDetection::Close() {
}


string TesseractOCRTextDetection::GetDetectionType() {
return "TEXT";
}

bool TesseractOCRTextDetection::Supports(MPFDetectionDataType data_type) {
return data_type == MPFDetectionDataType::IMAGE
|| data_type == MPFDetectionDataType::VIDEO
Expand Down
2 changes: 0 additions & 2 deletions cpp/TesseractOCRTextDetection/TesseractOCRTextDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ namespace MPF {

std::vector<MPFAudioTrack> GetDetections(const MPFAudioJob &job) override;

std::string GetDetectionType() override;

bool Supports(MPFDetectionDataType data_type) override;

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"name": "TESSERACTOCR",
"description": "Performs Tesseract optical character recognition.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
4 changes: 0 additions & 4 deletions cpp/TrtisDetection/TrtisDetection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ TrtisIpIrv2CocoJobConfig::TrtisIpIrv2CocoJobConfig(const MPFJob &job,
maxSpaceGapPxSq = maxSpaceGap * maxSpaceGap * frameDiagSq;
}

/******************************************************************************/
string TrtisDetection::GetDetectionType() {
return "FEATURE";
}

/******************************************************************************/
bool TrtisDetection::Close() {
Expand Down
1 change: 0 additions & 1 deletion cpp/TrtisDetection/TrtisDetection.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ namespace MPF{
bool Close() override;
vector<MPFVideoTrack> GetDetections(const MPFVideoJob &job) override;
vector<MPFImageLocation> GetDetections(const MPFImageJob &job) override;
string GetDetectionType() override;

private:

Expand Down
1 change: 1 addition & 0 deletions cpp/TrtisDetection/plugin-files/descriptor/descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"name": "TRTIS",
"description": "Returns a model-specific inference result from an input image.",
"actionType": "DETECTION",
"trackType": "FEATURE",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"name": "SPHINX",
"description": "Detects and transcribes English language speech in audio and video files.",
"actionType": "DETECTION",
"trackType": "SPEECH",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ public SphinxSpeechDetectionComponent() {
speechProcessor = new SphinxSpeechDetectionProcessor();
}

@Override
public String getDetectionType() {
return "SPEECH";
}

@Override
public List<MPFAudioTrack> getDetections(MPFAudioJob job) throws MPFComponentDetectionError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "TIKAIMAGE",
"description": "The Apache Tika image detection component.",
"actionType": "DETECTION",
"trackType": "MEDIA",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ public boolean supports(MPFDataType mpfDataType) {
return MPFDataType.UNKNOWN == mpfDataType;
}

@Override
public String getDetectionType() {
return "MEDIA";
}

@Override
public List<MPFImageLocation> getDetections(MPFImageJob job) throws MPFComponentDetectionError {
throw new MPFComponentDetectionError(MPFDetectionError.MPF_UNSUPPORTED_DATA_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "TIKATEXT",
"description": "The Apache Tika text detection component.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,6 @@ public boolean supports(MPFDataType mpfDataType) {
return MPFDataType.UNKNOWN.equals(mpfDataType);
}

public String getDetectionType() {
return "TEXT";
}

public List<MPFImageLocation> getDetections(MPFImageJob job) throws MPFComponentDetectionError {
throw new MPFComponentDetectionError(MPFDetectionError.MPF_UNSUPPORTED_DATA_TYPE, "Image detection not supported.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@


class ArgosTranslationComponent:
detection_type = 'TRANSLATION'

def get_detections_from_video(self, job: mpf.VideoJob) -> Sequence[mpf.VideoTrack]:
logger.info(f'Received video job.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "ARGOSTRANSLATION",
"description": "Uses Argos Translate to perform translation.",
"actionType": "DETECTION",
"trackType": "TRANSLATION",
"requiresCollection": {
"states": []
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@


class AcsFormDetectionComponent(mpf_util.ImageReaderMixin, object):
detection_type = 'TEXT'

def get_detections_from_generic(self, generic_job):
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "AZUREFORM",
"description": "Uses Azure Cognitive Services to perform form recognition in documents and images.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@


class AcsOcrComponent(mpf_util.ImageReaderMixin, mpf_util.VideoCaptureMixin):
detection_type = 'TEXT'

def get_detections_from_image_reader(self, image_job, image_reader):
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "AZUREOCR",
"description": "Uses Azure Cognitive Services to perform optical character recognition.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@


class AcsReadDetectionComponent(mpf_util.VideoCaptureMixin, mpf_util.ImageReaderMixin, object):
detection_type = 'TEXT'

@staticmethod
def get_detections_from_generic(generic_job):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"name": "AZUREREAD",
"description": "Uses Azure Cognitive Services to perform optical character recognition using the Azure Read API.",
"actionType": "DETECTION",
"trackType": "TEXT",
"outputChangedCounter" : 1,
"requiresCollection": {
"states": []
Expand Down
7 changes: 3 additions & 4 deletions python/AzureSpeechDetection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ Returned `AudioTrack` objects have the following members in their `detection_pro

| Property Key | Description |
|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `LONG_SPEAKER_ID` | A unique speaker identifier, of the form "`<start_offset>-<stop_offset>-<#>`, where `<start_offset>` and `<stop_offset>` are integers indicating the segment range (in frame counts for video jobs, milliseconds for audio jobs) for sub-jobs when a job has been segmented by the Workflow Manager. The final `#` portion of the ID is a 1-indexed counter for speaker identity within the indicated segment range. When jobs are not segmented, or not submitted through the Workflow Manager at all, `stop_offset` may instead be `EOF`, indicating that the job extends to the end of the file. |
| `SPEAKER_ID` | A dummy field set to "0". |
| `SPEAKER_ID` | A unique speaker identifier, of the form "`<start_offset>-<stop_offset>-<#>`, where `<start_offset>` and `<stop_offset>` are integers indicating the segment range (in frame counts for video jobs, milliseconds for audio jobs) for sub-jobs when a job has been segmented by the Workflow Manager. The final `#` portion of the ID is a 1-indexed counter for speaker identity within the indicated segment range. When jobs are not segmented, or not submitted through the Workflow Manager at all, `stop_offset` may instead be `EOF`, indicating that the job extends to the end of the file. |
| `GENDER` | Only present if supplied by an upstream component. The gender of the speaker. |
| `GENDER_CONFIDENCE` | Only present if supplied by an upstream component. The confidence of the gender classification. |
| `TRANSCRIPT` | The text of the utterance transcript. Words are space-separated. |
Expand All @@ -59,7 +58,7 @@ AudioTracks also have the `start_time` and `stop_time` of their associated utter


# Language Identifiers
The following are the BCP-47 codes and their corresponding languages which Azure Speech-to-Text supports.
The following are the BCP-47 codes and their corresponding languages which Azure Speech-to-Text supports.


| Language | BCP-47 | Language | BCP-47 |
Expand Down Expand Up @@ -167,4 +166,4 @@ If the language code supplied by a feed-forward track is not handled in `acs_spe
| `UZB` | Uzbek | `uz-UZ` |
| `VIE` | Vietnamese | `vi-VN` |
| `YUE` | Chinese (Cantonese) | `zh-HK`* |
| `ZUL` | Zulu | `zu-ZA` |
| `ZUL` | Zulu | `zu-ZA` |
Loading