forked from SkalskiP/make-sense
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AISelector.ts
39 lines (31 loc) · 1.22 KB
/
AISelector.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import {store} from '../..';
import { RoboflowAPIDetails } from '../ai/types';
export class AISelector {
public static getSuggestedLabelList(): string[] {
return store.getState().ai.suggestedLabelList;
}
public static getRejectedSuggestedLabelList(): string[] {
return store.getState().ai.rejectedSuggestedLabelList;
}
public static isAISSDObjectDetectorModelLoaded(): boolean {
return store.getState().ai.isSSDObjectDetectorLoaded;
}
public static isAIYOLOObjectDetectorModelLoaded(): boolean {
return store.getState().ai.isYOLOV5ObjectDetectorLoaded;
}
public static isAIPoseDetectorModelLoaded(): boolean {
return store.getState().ai.isPoseDetectorLoaded;
}
public static isRoboflowAPIModelLoaded(): boolean {
const roboflowAPIDetails = store.getState().ai.roboflowAPIDetails;
return (
roboflowAPIDetails.model !== '' && roboflowAPIDetails.key !== '' && roboflowAPIDetails.status
);
}
public static isAIDisabled(): boolean {
return store.getState().ai.isAIDisabled;
}
public static getRoboflowAPIDetails(): RoboflowAPIDetails {
return store.getState().ai.roboflowAPIDetails
}
}