Skip to content

Commit

Permalink
Merge branch 'main' into feature/windows-cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
kounoike committed Mar 19, 2022
2 parents d91c515 + f3b1226 commit 2b26cde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Add **Virtual Background Detector** to Audio/Video Filters. and also add **Virtu

![](doc/filter_2_en.png)

Since v1.2.0, default inference engine is changed. Now, default inference engine is CPU. But, it is low accuracy, heavy to compute. If you can use GPU, changing to GPU is better. But some case, GPU engine is crashed at initialize phase.

### Background settings

Place a background image, window capture, or game capture source below the filtered source. Set the size, crop, etc. to complete the settings.
Expand Down
6 changes: 4 additions & 2 deletions src/obs-virtualbg-detector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void detector_defaults(obs_data_t *settings) {
obs_data_set_default_double(settings, THRESHOLD_VALUE, 0.5);
obs_data_set_default_bool(settings, USE_MASK_BLUR, true);
#if defined(_WIN32) || USE_CUDA
obs_data_set_default_bool(settings, USE_GPU, true);
obs_data_set_default_bool(settings, USE_GPU, false);
#endif
}

Expand Down Expand Up @@ -292,7 +292,9 @@ void detector_setup_preprocess_scaler(virtual_bg_filter_data *filter_data, struc
int ret = video_scaler_create(&filter_data->preprocess_scaler, &tensor_scaler_info, &frame_scaler_info,
VIDEO_SCALE_BICUBIC);
if (ret != 0) {
blog(LOG_ERROR, "[Virtual BG detector] Can't create video_scaler_create %d", ret);
blog(LOG_ERROR, "[Virtual BG detector] Can't create video_scaler_create %d %dx%d -> %dx%d", ret,
filter_data->frame_width, filter_data->frame_height, filter_data->tensor_width,
filter_data->tensor_height);
throw new std::runtime_error("Cant create video_scaler_create");
} else {
blog(LOG_INFO, "[Virtual BG detector] video_scaler_create success. %dx%d -> %dx%d",
Expand Down

0 comments on commit 2b26cde

Please sign in to comment.