bugfixes
This commit is contained in:
parent
caf3e8b56b
commit
4fae998205
@ -2673,6 +2673,7 @@ func analyzeVideoFromFramesForGoal(
|
||||
|
||||
highlightHits, positionEvidence = applyVideoMAEPositionClipsForAnalyze(
|
||||
ctx,
|
||||
file,
|
||||
samples,
|
||||
durationSec,
|
||||
highlightHits,
|
||||
@ -2744,6 +2745,7 @@ func analyzeVideoFromFramesForGoal(
|
||||
|
||||
highlightHits, positionEvidence = applyVideoMAEPositionClipsForAnalyze(
|
||||
ctx,
|
||||
file,
|
||||
samples,
|
||||
durationSec,
|
||||
highlightHits,
|
||||
|
||||
@ -18,8 +18,9 @@ const (
|
||||
analyzeVideoMAEClipStrideSeconds = 2.0
|
||||
analyzeVideoMAEMinScore = 0.34
|
||||
analyzeVideoMAERequestBatchSize = 8
|
||||
analyzeVideoMAEMaxClips = 180
|
||||
analyzeVideoMAERequestTimeout = 75 * time.Second
|
||||
analyzeVideoMAEMaxClips = 96
|
||||
analyzeVideoMAERequestTimeout = 45 * time.Second
|
||||
analyzeVideoMAETotalTimeout = 2 * time.Minute
|
||||
)
|
||||
|
||||
type analyzeVideoMAEClipReqItem struct {
|
||||
@ -169,7 +170,7 @@ func predictVideoMAEPositionClipsForAnalyze(
|
||||
|
||||
body, err := json.Marshal(payload)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return out, err
|
||||
}
|
||||
|
||||
parsed, err := func() (analyzeVideoMAEClipPredictResp, error) {
|
||||
@ -231,7 +232,7 @@ func predictVideoMAEPositionClipsForAnalyze(
|
||||
return parsed, nil
|
||||
}()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return out, err
|
||||
}
|
||||
|
||||
if !parsed.Available {
|
||||
@ -252,6 +253,7 @@ func predictVideoMAEPositionClipsForAnalyze(
|
||||
|
||||
func applyVideoMAEPositionClipsForAnalyze(
|
||||
ctx context.Context,
|
||||
file string,
|
||||
samples []videoFrameSample,
|
||||
duration float64,
|
||||
highlightHits []analyzeHit,
|
||||
@ -268,7 +270,8 @@ func applyVideoMAEPositionClipsForAnalyze(
|
||||
}
|
||||
if len(clips) > analyzeVideoMAEMaxClips {
|
||||
appLogf(
|
||||
"VideoMAE Clip-Analyse begrenzt: clips=%d max=%d",
|
||||
"VideoMAE Clip-Analyse begrenzt file=%q clips=%d max=%d",
|
||||
strings.TrimSpace(file),
|
||||
len(clips),
|
||||
analyzeVideoMAEMaxClips,
|
||||
)
|
||||
@ -279,15 +282,23 @@ func applyVideoMAEPositionClipsForAnalyze(
|
||||
onProgress(0, len(clips))
|
||||
}
|
||||
|
||||
predictions, err := predictVideoMAEPositionClipsForAnalyze(ctx, clips, onProgress)
|
||||
videoCtx, cancel := context.WithTimeout(ctx, analyzeVideoMAETotalTimeout)
|
||||
defer cancel()
|
||||
|
||||
predictions, err := predictVideoMAEPositionClipsForAnalyze(videoCtx, clips, onProgress)
|
||||
if err != nil {
|
||||
if ctx.Err() == nil {
|
||||
appLogf(
|
||||
"VideoMAE Clip-Analyse begrenzt/übersprungen file=%q predictions=%d err=%v",
|
||||
strings.TrimSpace(file),
|
||||
len(predictions),
|
||||
err,
|
||||
)
|
||||
if onProgress != nil {
|
||||
onProgress(len(clips), len(clips))
|
||||
}
|
||||
appLogln("VideoMAE Clip-Analyse übersprungen:", err)
|
||||
}
|
||||
return highlightHits, positionEvidence
|
||||
}
|
||||
|
||||
for _, pred := range predictions {
|
||||
|
||||
BIN
backend/dist/nsfwapp-linux-amd64
vendored
Normal file
BIN
backend/dist/nsfwapp-linux-amd64
vendored
Normal file
Binary file not shown.
BIN
backend/dist/nsfwapp.exe
vendored
BIN
backend/dist/nsfwapp.exe
vendored
Binary file not shown.
BIN
backend/dist/nsfwapp_amd64.deb
vendored
BIN
backend/dist/nsfwapp_amd64.deb
vendored
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user