Skip to content

Commit

Permalink
Revert "Add demo for tensorflow bodypix (#1027)" (#1032)
Browse files Browse the repository at this point in the history
This reverts commit 9f3eaa1.
  • Loading branch information
XHatan authored Jan 27, 2021
1 parent 9f3eaa1 commit 93cd182
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 156 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- [DEMO] Add a image segmentation video filter based on Tensorflow BodyPix


### Changed
Expand Down
24 changes: 1 addition & 23 deletions demos/browser/app/meetingV2/meetingV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ import {

import CircularCut from './videofilter/CircularCut';
import EmojifyVideoFrameProcessor from './videofilter/EmojifyVideoFrameProcessor';
import SegmentationProcessor from './videofilter/SegmentationProcessor';
import {
loadBodyPixDependency,
platformCanSupportBodyPixWithoutDegradation,
} from './videofilter/SegmentationUtil';
import WebRTCStatsCollector from './webrtcstatscollector/WebRTCStatsCollector';

const SHOULD_DIE_ON_FATALS = (() => {
Expand Down Expand Up @@ -124,7 +119,7 @@ const VOICE_FOCUS_SPEC = {
paths: VOICE_FOCUS_PATHS,
};

type VideoFilterName = 'Emojify' | 'CircularCut' | 'NoOp' | 'None' | 'Segmentation';
type VideoFilterName = 'Emojify' | 'CircularCut' | 'NoOp' | 'None';

const VIDEO_FILTERS: VideoFilterName[] = ['Emojify', 'CircularCut', 'NoOp'];

Expand Down Expand Up @@ -218,9 +213,6 @@ export class DemoMeetingApp
static readonly DATA_MESSAGE_TOPIC: string = 'chat';
static readonly DATA_MESSAGE_LIFETIME_MS: number = 300000;

// ideally we don't need to change this. Keep this configurable in case users have super slow network.
loadingBodyPixDependencyTimeoutMs: number = 10000;

showActiveSpeakerScores = false;
activeSpeakerLayout = true;
meeting: string | null = null;
Expand Down Expand Up @@ -1596,16 +1588,6 @@ export class DemoMeetingApp
this.enableUnifiedPlanForChromiumBasedBrowsers
) {
filters = filters.concat(VIDEO_FILTERS);

if (platformCanSupportBodyPixWithoutDegradation()) {
try {
await loadBodyPixDependency(this.loadingBodyPixDependencyTimeoutMs);
filters.push('Segmentation');
} catch (error) {
fatal(error);
this.log('failed to load segmentation dependencies', error);
}
}
}

this.populateInMeetingDeviceList(
Expand Down Expand Up @@ -2048,10 +2030,6 @@ export class DemoMeetingApp
return new NoOpVideoFrameProcessor();
}

if (videoFilter === 'Segmentation') {
return new SegmentationProcessor();
}

return null;
}

Expand Down
6 changes: 5 additions & 1 deletion demos/browser/app/meetingV2/videofilter/CircularCut.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { CanvasVideoFrameBuffer, VideoFrameBuffer, VideoFrameProcessor } from 'amazon-chime-sdk-js';
import {
CanvasVideoFrameBuffer,
VideoFrameBuffer,
VideoFrameProcessor,
} from 'amazon-chime-sdk-js';

/**
* [[CircularCut]] is an implementation of {@link VideoFrameProcessor} for demonstration purpose.
Expand Down
6 changes: 5 additions & 1 deletion demos/browser/app/meetingV2/videofilter/ResizeProcessor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import { CanvasVideoFrameBuffer, VideoFrameBuffer, VideoFrameProcessor } from 'amazon-chime-sdk-js';
import {
CanvasVideoFrameBuffer,
VideoFrameBuffer,
VideoFrameProcessor,
} from 'amazon-chime-sdk-js';

/**
* [[ResizeProcessor]] updates the input {@link VideoFrameBuffer} and resize given the display aspect ratio.
Expand Down
70 changes: 0 additions & 70 deletions demos/browser/app/meetingV2/videofilter/SegmentationProcessor.ts

This file was deleted.

60 changes: 0 additions & 60 deletions demos/browser/app/meetingV2/videofilter/SegmentationUtil.ts

This file was deleted.

0 comments on commit 93cd182

Please sign in to comment.