mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 12:14:12 +00:00 
			
		
		
		
	Dynamically load TensorFlow JS
This commit is contained in:
		@@ -993,6 +993,9 @@ class CallWindow extends CustomEvents {
 | 
			
		||||
							// Load network if required
 | 
			
		||||
							if (!this.backgroundDetectionNetwork)
 | 
			
		||||
							{
 | 
			
		||||
								await includeJS(ComunicConfig.assetsURL + "3rdparty/tfjs/tfjs-1.2.min.js");
 | 
			
		||||
								await includeJS(ComunicConfig.assetsURL + "3rdparty/tensorflow-models/body-pix-2.0.js");
 | 
			
		||||
 | 
			
		||||
								this.backgroundDetectionNetwork = await bodyPix.load({
 | 
			
		||||
									multiplier: 0.75,
 | 
			
		||||
									stride: 32,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user