Skip to content

Commit

Permalink
cmd/livepeer: sceneClassificationModelPath flag
Browse files Browse the repository at this point in the history
  • Loading branch information
yondonfu authored and jailuthra committed Jun 16, 2021
1 parent c668080 commit 54052b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/livepeer/livepeer.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func main() {
currentManifest := flag.Bool("currentManifest", false, "Expose the currently active ManifestID as \"/stream/current.m3u8\"")
nvidia := flag.String("nvidia", "", "Comma-separated list of Nvidia GPU device IDs (or \"all\" for all available devices)")
testTranscoder := flag.Bool("testTranscoder", true, "Test Nvidia GPU transcoding at startup")
sceneClassification := flag.Bool("sceneClassification", false, "Enable scene classification")
sceneClassificationModelPath := flag.String("sceneClassificationModelPath", "", "Path to scene classification model")

// Onchain:
ethAcctAddr := flag.String("ethAcctAddr", "", "Existing Eth account address")
Expand Down Expand Up @@ -268,10 +268,10 @@ func main() {
}
}
// FIXME: Short-term hack to pre-load the detection model for the whole node
if *sceneClassification {
if *sceneClassificationModelPath != "" {
detectorProfile := ffmpeg.DSceneAdultSoccer
detectorProfile.ModelPath = fmt.Sprintf("%s/%s", core.WorkDir, ffmpeg.DSceneAdultSoccer.ModelPath)
err = ffmpeg.InitFFmpegWithDetectProfile(&detectorProfile, strings.Join(devices, ","))
detectorProfile.ModelPath = *sceneClassificationModelPath
err = ffmpeg.InitFFmpegWithDetectorProfile(&detectorProfile, strings.Join(devices, ","))
if err != nil {
glog.Fatalf("Could not initialize detector profiles")
}
Expand Down

0 comments on commit 54052b6

Please sign in to comment.