Conscience Core
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
conscience_core::detector_engine Namespace Reference

Namespaces

 yolov8
 

Classes

class  ConscienceVisionDetectorRepository
 
class  CscDetectorAiAPI
 
class  CscDetectorConfigurationRepository
 
class  CscDetectorEngine
 
class  CscDetectorEngineArucoToObjects
 
class  CscDetectorEngineColorExtractor
 
class  CscDetectorEngineHaarCascade
 
class  CscDetectorEngineHandPose
 
class  CscDetectorEngineMultiple
 
class  CscDetectorEnginePersonPose
 
class  CscDetectorEngineQRCodeToText
 
class  CscDetectorEngineShapeExtractor
 
class  CscDetectorEngineYoloV4
 
class  CscDetectorEngineYoloV8
 
class  CscDetectorResources
 
class  CscDNNPool
 
struct  DetectableObjectClass
 
struct  DetectionParameters
 
struct  DetectionResult
 
class  DetectorSourceImage
 
struct  LenseParameter
 
struct  OngoingDetectionResult
 

Typedefs

using SafeNeuralNetwork = CscDNNPool::SafeNeuralNetwork
 
typedef function< bool(const OngoingDetectionResult &detectionResult)> DetectorIsEnabledFunction
 
using DetectableObjectClassId = int
 

Enumerations

enum  ConscienceDetectorType {
  None, All, Mire, Train,
  AllDarknet, Face, Hand, Car,
  MireB, MireOnTrain, MireOnCar, Fire,
  Weapons, Phone, SecurityAlerts, Knife,
  Gun, UnconsciousPerson, ArucoMarkers, Care,
  Tetra, Person, ColorExtractor, QRCodeExtractor,
  ShapeExtractor, BedAndChairs, Yolov8, AiAPI
}
 
enum  DetectableObjectTypes {
  DetectableObjectType_Person = 0, DetectableObjectType_Bicycle = 1, DetectableObjectType_Car = 2, DetectableObjectType_Motorbike = 3,
  DetectableObjectType_Airplane = 4, DetectableObjectType_Bus = 5, DetectableObjectType_Train = 6, DetectableObjectType_Truck = 7,
  DetectableObjectType_Boat = 8, DetectableObjectType_TrafficLight = 9, DetectableObjectType_FireHydrant = 10, DetectableObjectType_StopSign = 11,
  DetectableObjectType_ParkingMeter = 12, DetectableObjectType_Bench = 13, DetectableObjectType_Bird = 14, DetectableObjectType_Cat = 15,
  DetectableObjectType_Dog = 16, DetectableObjectType_Horse = 17, DetectableObjectType_Sheep = 18, DetectableObjectType_Cow = 19,
  DetectableObjectType_Elephant = 20, DetectableObjectType_Bear = 21, DetectableObjectType_Zebra = 22, DetectableObjectType_Giraffe = 23,
  DetectableObjectType_Backpack = 24, DetectableObjectType_Umbrella = 25, DetectableObjectType_HandBag = 26, DetectableObjectType_Tie = 27,
  DetectableObjectType_Suitcase = 28, DetectableObjectType_Frisbee = 29, DetectableObjectType_Skis = 30, DetectableObjectType_Snowboard = 31,
  DetectableObjectType_SportsBall = 32, DetectableObjectType_Kite = 33, DetectableObjectType_BaseballBat = 34, DetectableObjectType_BaseballGlove = 35,
  DetectableObjectType_Skateboard = 36, DetectableObjectType_Surfboard = 37, DetectableObjectType_TennisRacket = 38, DetectableObjectType_Bottle = 39,
  DetectableObjectType_WineGlass = 40, DetectableObjectType_Cup = 41, DetectableObjectType_Fork = 42, DetectableObjectType_KnifeBall = 43,
  DetectableObjectType_Spoon = 44, DetectableObjectType_Bowl = 45, DetectableObjectType_Bannana = 46, DetectableObjectType_Apple = 47,
  DetectableObjectType_Sandwich = 48, DetectableObjectType_Orange = 49, DetectableObjectType_Broccoli = 50, DetectableObjectType_Carrot = 51,
  DetectableObjectType_HotDog = 52, DetectableObjectType_Pizza = 53, DetectableObjectType_Donut = 54, DetectableObjectType_Cake = 55,
  DetectableObjectType_Chair = 56, DetectableObjectType_Couch = 57, DetectableObjectType_PottedPlant = 58, DetectableObjectType_Bed = 59,
  DetectableObjectType_DiningTable = 60, DetectableObjectType_Toilet = 61, DetectableObjectType_TV = 62, DetectableObjectType_Laptop = 63,
  DetectableObjectType_Mouse = 64, DetectableObjectType_Remote = 65, DetectableObjectType_Keyboard = 66, DetectableObjectType_Phone = 67,
  DetectableObjectType_Microwave = 68, DetectableObjectType_Oven = 69, DetectableObjectType_Toaster = 70, DetectableObjectType_Sink = 71,
  DetectableObjectType_Refrigerator = 72, DetectableObjectType_Book = 73, DetectableObjectType_Clock = 74, DetectableObjectType_Vase = 75,
  DetectableObjectType_Scissors = 76, DetectableObjectType_TeddyBear = 77, DetectableObjectType_HairDrier = 78, DetectableObjectType_Toothbrush = 79
}
 

Functions

const string detectorLevelToString (ConscienceDetectorType detector)
 
void populateInterpPoints (const cv::Point &a, const cv::Point &b, int numPoints, vector< cv::Point > &interpCoords)
 
float intersectRatio (const vector< Point2f > &zone, const cv::Rect &boundingBox, Mat &imageMatrix, bool drawIntersectedPoints)
 
 ENUM (CscDetectedPersonPose, NonePose, LyingDown, StandingUp, Sit)
 

Variables

const map< string, ConscienceDetectorTypedetectorsStringMap
 
Csc3dElementModelsRepositoryobjectModelsRepository = Csc3dElementModelsRepository::getObjectRepositoryInstance()
 
const int POSE_PAIRS [20][2]
 
int nPoints = 22
 
float thresh = 0.01
 
static const vector< string > TOP_PART_NAMES = {"REye", "LEye", "REar", "LEar", "Nose", "RShoulder", "LShoulder", "Neck"}
 
static const vector< string > MIDDLE_PART_NAMES = {"RElbow", "LElbow", "RWrist", "LWrist", "RHip", "MidHip", "LHip"}
 
static const vector< string > BOTTOM_PART_NAMES = {"RKnee", "LKnee", "RAnkle", "LAnkle", "LBigToe", "LSmallToe", "LHeel", "RBigToe", "RSmallToe", "RHeel"}
 
const float DNN_NMS_THRESHOLD = 0.1
 
static const map< DetectableObjectTypes, const DetectableObjectClassdetectableObjectClasses
 

Typedef Documentation

◆ DetectableObjectClassId

◆ DetectorIsEnabledFunction

◆ SafeNeuralNetwork

Enumeration Type Documentation

◆ ConscienceDetectorType

Enumerator
None 
All 
Mire 
Train 
AllDarknet 
Face 
Hand 
Car 
MireB 
MireOnTrain 
MireOnCar 
Fire 
Weapons 
Phone 
SecurityAlerts 
Knife 
Gun 
UnconsciousPerson 
ArucoMarkers 
Care 
Tetra 
Person 
ColorExtractor 
QRCodeExtractor 
ShapeExtractor 
BedAndChairs 
Yolov8 
AiAPI 

◆ DetectableObjectTypes

Lists available object types for detection by detect objects command

Warning
those ids are yolo coco ids, and different from Conscience object model ids
Enumerator
DetectableObjectType_Person 
DetectableObjectType_Bicycle 
DetectableObjectType_Car 
DetectableObjectType_Motorbike 
DetectableObjectType_Airplane 
DetectableObjectType_Bus 
DetectableObjectType_Train 
DetectableObjectType_Truck 
DetectableObjectType_Boat 
DetectableObjectType_TrafficLight 
DetectableObjectType_FireHydrant 
DetectableObjectType_StopSign 
DetectableObjectType_ParkingMeter 
DetectableObjectType_Bench 
DetectableObjectType_Bird 
DetectableObjectType_Cat 
DetectableObjectType_Dog 
DetectableObjectType_Horse 
DetectableObjectType_Sheep 
DetectableObjectType_Cow 
DetectableObjectType_Elephant 
DetectableObjectType_Bear 
DetectableObjectType_Zebra 
DetectableObjectType_Giraffe 
DetectableObjectType_Backpack 
DetectableObjectType_Umbrella 
DetectableObjectType_HandBag 
DetectableObjectType_Tie 
DetectableObjectType_Suitcase 
DetectableObjectType_Frisbee 
DetectableObjectType_Skis 
DetectableObjectType_Snowboard 
DetectableObjectType_SportsBall 
DetectableObjectType_Kite 
DetectableObjectType_BaseballBat 
DetectableObjectType_BaseballGlove 
DetectableObjectType_Skateboard 
DetectableObjectType_Surfboard 
DetectableObjectType_TennisRacket 
DetectableObjectType_Bottle 
DetectableObjectType_WineGlass 
DetectableObjectType_Cup 
DetectableObjectType_Fork 
DetectableObjectType_KnifeBall 
DetectableObjectType_Spoon 
DetectableObjectType_Bowl 
DetectableObjectType_Bannana 
DetectableObjectType_Apple 
DetectableObjectType_Sandwich 
DetectableObjectType_Orange 
DetectableObjectType_Broccoli 
DetectableObjectType_Carrot 
DetectableObjectType_HotDog 
DetectableObjectType_Pizza 
DetectableObjectType_Donut 
DetectableObjectType_Cake 
DetectableObjectType_Chair 
DetectableObjectType_Couch 
DetectableObjectType_PottedPlant 
DetectableObjectType_Bed 
DetectableObjectType_DiningTable 
DetectableObjectType_Toilet 
DetectableObjectType_TV 
DetectableObjectType_Laptop 
DetectableObjectType_Mouse 
DetectableObjectType_Remote 
DetectableObjectType_Keyboard 
DetectableObjectType_Phone 
DetectableObjectType_Microwave 
DetectableObjectType_Oven 
DetectableObjectType_Toaster 
DetectableObjectType_Sink 
DetectableObjectType_Refrigerator 
DetectableObjectType_Book 
DetectableObjectType_Clock 
DetectableObjectType_Vase 
DetectableObjectType_Scissors 
DetectableObjectType_TeddyBear 
DetectableObjectType_HairDrier 
DetectableObjectType_Toothbrush 

Function Documentation

◆ detectorLevelToString()

const string conscience_core::detector_engine::detectorLevelToString ( ConscienceDetectorType  detector)
inline

◆ ENUM()

conscience_core::detector_engine::ENUM ( CscDetectedPersonPose  ,
NonePose  ,
LyingDown  ,
StandingUp  ,
Sit   
)

◆ intersectRatio()

float conscience_core::detector_engine::intersectRatio ( const vector< Point2f > &  zone,
const cv::Rect &  boundingBox,
Mat &  imageMatrix,
bool  drawIntersectedPoints 
)
inline

◆ populateInterpPoints()

void conscience_core::detector_engine::populateInterpPoints ( const cv::Point &  a,
const cv::Point &  b,
int  numPoints,
vector< cv::Point > &  interpCoords 
)

Variable Documentation

◆ BOTTOM_PART_NAMES

const vector<string> conscience_core::detector_engine::BOTTOM_PART_NAMES = {"RKnee", "LKnee", "RAnkle", "LAnkle", "LBigToe", "LSmallToe", "LHeel", "RBigToe", "RSmallToe", "RHeel"}
static

◆ detectableObjectClasses

const map<DetectableObjectTypes, const DetectableObjectClass> conscience_core::detector_engine::detectableObjectClasses
static

◆ detectorsStringMap

const map<string, ConscienceDetectorType> conscience_core::detector_engine::detectorsStringMap

◆ DNN_NMS_THRESHOLD

const float conscience_core::detector_engine::DNN_NMS_THRESHOLD = 0.1

◆ MIDDLE_PART_NAMES

const vector<string> conscience_core::detector_engine::MIDDLE_PART_NAMES = {"RElbow", "LElbow", "RWrist", "LWrist", "RHip", "MidHip", "LHip"}
static

◆ nPoints

int conscience_core::detector_engine::nPoints = 22

◆ objectModelsRepository

Csc3dElementModelsRepository* conscience_core::detector_engine::objectModelsRepository = Csc3dElementModelsRepository::getObjectRepositoryInstance()

◆ POSE_PAIRS

const int conscience_core::detector_engine::POSE_PAIRS[20][2]
Initial value:
=
{
{0,1}, {1,2}, {2,3}, {3,4},
{0,5}, {5,6}, {6,7}, {7,8},
{0,9}, {9,10}, {10,11}, {11,12},
{0,13}, {13,14}, {14,15}, {15,16},
{0,17}, {17,18}, {18,19}, {19,20}
}

◆ thresh

float conscience_core::detector_engine::thresh = 0.01

◆ TOP_PART_NAMES

const vector<string> conscience_core::detector_engine::TOP_PART_NAMES = {"REye", "LEye", "REar", "LEar", "Nose", "RShoulder", "LShoulder", "Neck"}
static
conscience_core::detector_engine::Yolov8
@ Yolov8
Definition: CscCommonDetectorTypes.h:40
conscience_core::detector_engine::Weapons
@ Weapons
Definition: CscCommonDetectorTypes.h:26
conscience_core::detector_engine::All
@ All
Definition: CscCommonDetectorTypes.h:15
conscience_core::detector_engine::MireOnTrain
@ MireOnTrain
Definition: CscCommonDetectorTypes.h:23
conscience_core::detector_engine::Face
@ Face
Definition: CscCommonDetectorTypes.h:19
conscience_core::detector_engine::ColorExtractor
@ ColorExtractor
Definition: CscCommonDetectorTypes.h:36
conscience_core::detector_engine::Phone
@ Phone
Definition: CscCommonDetectorTypes.h:27
conscience_core::detector_engine::Tetra
@ Tetra
Definition: CscCommonDetectorTypes.h:34
conscience_core::detector_engine::Mire
@ Mire
Definition: CscCommonDetectorTypes.h:16
conscience_core::detector_engine::MireB
@ MireB
Definition: CscCommonDetectorTypes.h:22
conscience_core::detector_engine::ShapeExtractor
@ ShapeExtractor
Definition: CscCommonDetectorTypes.h:38
conscience_core::detector_engine::Hand
@ Hand
Definition: CscCommonDetectorTypes.h:20
conscience_core::detector_engine::Car
@ Car
Definition: CscCommonDetectorTypes.h:21
None
@ None
Definition: CscStrategyType.h:107
conscience_core::detector_engine::Care
@ Care
Definition: CscCommonDetectorTypes.h:33
conscience_core::detector_engine::UnconsciousPerson
@ UnconsciousPerson
Definition: CscCommonDetectorTypes.h:31
conscience_core::detector_engine::Knife
@ Knife
Definition: CscCommonDetectorTypes.h:29
conscience_core::detector_engine::SecurityAlerts
@ SecurityAlerts
Definition: CscCommonDetectorTypes.h:28
conscience_core::detector_engine::Fire
@ Fire
Definition: CscCommonDetectorTypes.h:25
conscience_core::detector_engine::BedAndChairs
@ BedAndChairs
Definition: CscCommonDetectorTypes.h:39
conscience_core::detector_engine::ArucoMarkers
@ ArucoMarkers
Definition: CscCommonDetectorTypes.h:32
conscience_core::detector_engine::Person
@ Person
Definition: CscCommonDetectorTypes.h:35
conscience_core::detector_engine::Gun
@ Gun
Definition: CscCommonDetectorTypes.h:30
conscience_core::detector_engine::AiAPI
@ AiAPI
Definition: CscCommonDetectorTypes.h:41
conscience_core::detector_engine::Train
@ Train
Definition: CscCommonDetectorTypes.h:17
conscience_core::detector_engine::AllDarknet
@ AllDarknet
Definition: CscCommonDetectorTypes.h:18
conscience_core::detector_engine::QRCodeExtractor
@ QRCodeExtractor
Definition: CscCommonDetectorTypes.h:37
conscience_core::detector_engine::MireOnCar
@ MireOnCar
Definition: CscCommonDetectorTypes.h:24