Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- class Rectangle a where
- class (Eq (ClassG a), Eq (ClassD a)) => BoundingBox a where
- data Detection a :: Type
- type ClassG a :: Type
- type ClassD a :: Type
- data ErrorType a :: Type
- type InterestArea a :: Type
- type InterestObject a :: Type
- data Env a :: Type
- type Idx a :: Type
- type ImgIdx a :: Type
- data Risk a :: Type
- riskE :: Env a -> [Risk a]
- riskForGroundTruth :: Monad m => ReaderT (Env a) m [Risk a]
- riskForDetection :: Monad m => ReaderT (Env a) m [Risk a]
- interestArea :: Env a -> InterestArea a
- interestObject :: Env a -> InterestObject a
- groundTruth :: Env a -> Vector a
- detection :: Env a -> Vector (Detection a)
- confidenceScoreThresh :: Env a -> Double
- ioUThresh :: Env a -> Double
- scoreD :: Detection a -> Double
- sizeD :: Detection a -> Double
- classD :: Detection a -> ClassG a
- idD :: Detection a -> Idx a
- imageId :: Env a -> ImgIdx a
- isFrontD :: Detection a -> Detection a -> Bool
- isBackD :: Detection a -> Detection a -> Bool
- isLeftD :: Detection a -> Detection a -> Bool
- isRightD :: Detection a -> Detection a -> Bool
- isTopD :: Detection a -> Detection a -> Bool
- isBottomD :: Detection a -> Detection a -> Bool
- isBackGroundD :: ClassD a -> Bool
- detectD :: Env a -> Detection a -> Maybe a
- toErrorType :: Risk a -> ErrorType a
- toRiskScore :: Risk a -> Double
- sizeG :: a -> Double
- classG :: a -> ClassG a
- angle :: a -> Detection a -> Double
- idG :: a -> Idx a
- ioU :: a -> Detection a -> Double
- ioG :: a -> Detection a -> Double
- ioD :: a -> Detection a -> Double
- detectG :: Env a -> a -> Maybe (Detection a)
- isInIeterestAreaD :: InterestArea a -> Detection a -> Bool
- isInIeterestAreaG :: InterestArea a -> a -> Bool
- isInterestObjectD :: InterestObject a -> Detection a -> Bool
- isInterestObjectG :: InterestObject a -> a -> Bool
- class (NFData (ImgIdx a), NFData (Risk a), BoundingBox a) => World b a where
- envs :: b -> [Env a]
- toEnv :: b -> ImgIdx a -> Env a
- toImageIds :: b -> [ImgIdx a]
- mAP :: b -> Double
- ap :: b -> Map (ClassG a) Double
- mF1 :: b -> Double
- f1 :: b -> Map (ClassG a) Double
- risk :: b -> [Risk a]
- confusionMatrixRecall :: b -> Map (ClassG a, ClassD a) [Risk a]
- confusionMatrixPrecision :: b -> Map (ClassD a, ClassG a) [Risk a]
- loopG :: forall a m b. (BoundingBox a, Monad m) => (b -> b -> b) -> b -> (a -> ReaderT (Env a) m b) -> ReaderT (Env a) m b
- loopD :: forall a m b. (BoundingBox a, Monad m) => (b -> b -> b) -> b -> (Detection a -> ReaderT (Env a) m b) -> ReaderT (Env a) m b
- detectMaxIouG :: BoundingBox a => Env a -> a -> Maybe (Detection a)
- detectMaxIouD :: BoundingBox a => Env a -> Detection a -> Maybe a
- whenInterestAreaD :: forall m a b. (Monad m, BoundingBox a) => Bool -> Detection a -> ReaderT (Env a) m [b] -> ReaderT (Env a) m [b]
- whenInterestAreaG :: forall m a b. (Monad m, BoundingBox a) => Bool -> a -> ReaderT (Env a) m [b] -> ReaderT (Env a) m [b]
- runRisk :: forall context a. World context a => context -> [(ImgIdx a, Double)]
- runRiskWithError :: forall context a. World context a => context -> [(ImgIdx a, [Risk a])]
- generateRiskWeightedImages :: forall b a. World b a => b -> [ImgIdx a]
Documentation
class Rectangle a where Source #
Instances
Rectangle BoundingBoxGT Source # | |
Defined in RiskWeaver.DSL.BDD rX :: BoundingBoxGT -> Double Source # rY :: BoundingBoxGT -> Double Source # rW :: BoundingBoxGT -> Double Source # rH :: BoundingBoxGT -> Double Source # | |
Rectangle (Detection BoundingBoxGT) Source # | |
Defined in RiskWeaver.DSL.BDD |
class (Eq (ClassG a), Eq (ClassD a)) => BoundingBox a where Source #
Bounding box type class of ground truth
riskForGroundTruth, riskForDetection, interestArea, interestObject, groundTruth, detection, confidenceScoreThresh, ioUThresh, scoreD, classD, idD, imageId, isBackD, isLeftD, isRightD, isTopD, isBottomD, isBackGroundD, toErrorType, toRiskScore, classG, angle, idG, isInIeterestAreaD, isInIeterestAreaG, isInterestObjectD, isInterestObjectG
data Detection a :: Type Source #
Detection type
type ClassG a :: Type Source #
Ground truth class type
type ClassD a :: Type Source #
Detection class type
data ErrorType a :: Type Source #
Error type
type InterestArea a :: Type Source #
Interest area type
type InterestObject a :: Type Source #
Interest object type
Environment type of the image
Index type of bounding box annotations
type ImgIdx a :: Type Source #
Image index type of bounding box annotations
Risk type
riskE :: Env a -> [Risk a] Source #
Risk of the environment
riskForGroundTruth :: Monad m => ReaderT (Env a) m [Risk a] Source #
Risk of groundtruth
riskForDetection :: Monad m => ReaderT (Env a) m [Risk a] Source #
Risk of detection
interestArea :: Env a -> InterestArea a Source #
Interest area of the environment
interestObject :: Env a -> InterestObject a Source #
Interest object of the environment
groundTruth :: Env a -> Vector a Source #
Ground truth of the environment
detection :: Env a -> Vector (Detection a) Source #
Detection of the environment
confidenceScoreThresh :: Env a -> Double Source #
Confidence score threshold
ioUThresh :: Env a -> Double Source #
IoU threshold
scoreD :: Detection a -> Double Source #
Confidence score of the detection
sizeD :: Detection a -> Double Source #
Size of the detection
classD :: Detection a -> ClassG a Source #
Class of the detection
idD :: Detection a -> Idx a Source #
Index of the detection
imageId :: Env a -> ImgIdx a Source #
Index of the image
isFrontD :: Detection a -> Detection a -> Bool Source #
True if the detection is in front of the other detection
isBackD :: Detection a -> Detection a -> Bool Source #
True if the detection is in back of the other detection
isLeftD :: Detection a -> Detection a -> Bool Source #
True if the detection is in left of the other detection
isRightD :: Detection a -> Detection a -> Bool Source #
True if the detection is in right of the other detection
isTopD :: Detection a -> Detection a -> Bool Source #
True if the detection is in top of the other detection
isBottomD :: Detection a -> Detection a -> Bool Source #
True if the detection is in bottom of the other detection
isBackGroundD :: ClassD a -> Bool Source #
True if the detection is background
detectD :: Env a -> Detection a -> Maybe a Source #
Detect the ground truth of the detection
toErrorType :: Risk a -> ErrorType a Source #
Get error type from risk
toRiskScore :: Risk a -> Double Source #
Get a score from risk
Size of the ground truth
classG :: a -> ClassG a Source #
Class of the ground truth
angle :: a -> Detection a -> Double Source #
Angle of detection to the ground truth
Index of the ground truth
ioU :: a -> Detection a -> Double Source #
IoU(Intersection Over Union) of the ground truth and the detection
ioG :: a -> Detection a -> Double Source #
IoG(Intersection Over Ground truth) of the ground truth and the detection
ioD :: a -> Detection a -> Double Source #
IoD(Intersection Over Detection) of the ground truth and the detection
detectG :: Env a -> a -> Maybe (Detection a) Source #
Detect the detection of the ground truth
isInIeterestAreaD :: InterestArea a -> Detection a -> Bool Source #
True if the detection is in the interest area
isInIeterestAreaG :: InterestArea a -> a -> Bool Source #
True if the ground truth is in the interest area
isInterestObjectD :: InterestObject a -> Detection a -> Bool Source #
True if the detection is in the interest object
isInterestObjectG :: InterestObject a -> a -> Bool Source #
True if the ground truth is in the interest object
Instances
class (NFData (ImgIdx a), NFData (Risk a), BoundingBox a) => World b a where Source #
b includes ground-truth images and detection images.
Environments of the image
toEnv :: b -> ImgIdx a -> Env a Source #
An environment of the image
toImageIds :: b -> [ImgIdx a] Source #
An environment of the image
mAP of the images
ap :: b -> Map (ClassG a) Double Source #
AP of the images for each class
mF1 of the images
f1 :: b -> Map (ClassG a) Double Source #
F1 of the images for each class
risk :: b -> [Risk a] Source #
Risk of the images
confusionMatrixRecall :: b -> Map (ClassG a, ClassD a) [Risk a] Source #
Confusion matrix of recall
confusionMatrixPrecision :: b -> Map (ClassD a, ClassG a) [Risk a] Source #
Confusion matrix of precision
Instances
World BddContext BoundingBoxGT Source # | |
Defined in RiskWeaver.DSL.BDD envs :: BddContext -> [Env BoundingBoxGT] Source # toEnv :: BddContext -> ImgIdx BoundingBoxGT -> Env BoundingBoxGT Source # toImageIds :: BddContext -> [ImgIdx BoundingBoxGT] Source # mAP :: BddContext -> Double Source # ap :: BddContext -> Map (ClassG BoundingBoxGT) Double Source # mF1 :: BddContext -> Double Source # f1 :: BddContext -> Map (ClassG BoundingBoxGT) Double Source # risk :: BddContext -> [Risk BoundingBoxGT] Source # confusionMatrixRecall :: BddContext -> Map (ClassG BoundingBoxGT, ClassD BoundingBoxGT) [Risk BoundingBoxGT] Source # confusionMatrixPrecision :: BddContext -> Map (ClassD BoundingBoxGT, ClassG BoundingBoxGT) [Risk BoundingBoxGT] Source # |
loopG :: forall a m b. (BoundingBox a, Monad m) => (b -> b -> b) -> b -> (a -> ReaderT (Env a) m b) -> ReaderT (Env a) m b Source #
Loop for ground truth
loopD :: forall a m b. (BoundingBox a, Monad m) => (b -> b -> b) -> b -> (Detection a -> ReaderT (Env a) m b) -> ReaderT (Env a) m b Source #
Loop for detection
detectMaxIouG :: BoundingBox a => Env a -> a -> Maybe (Detection a) Source #
detectMaxIouD :: BoundingBox a => Env a -> Detection a -> Maybe a Source #
whenInterestAreaD :: forall m a b. (Monad m, BoundingBox a) => Bool -> Detection a -> ReaderT (Env a) m [b] -> ReaderT (Env a) m [b] Source #
whenInterestAreaG :: forall m a b. (Monad m, BoundingBox a) => Bool -> a -> ReaderT (Env a) m [b] -> ReaderT (Env a) m [b] Source #
generateRiskWeightedImages :: forall b a. World b a => b -> [ImgIdx a] Source #