Advancements in Synthetic Video Generation for Autonomous Driving
4.6 OBJECTIVE FUNCTIONS USED IN PROPOSED GAN
The objective functions in GANs consist of commonly used Loss functions known as Hinge Loss , feature extractor loss , and flow loss , like what was used in existing video-to-video synthesis methods [ 4 ] - [ 6 ]. Hinge loss is calculated as in ( 2 ). The generator tries to minimize , and the discriminator tries to maximize the objective function .
L Hinge ( G , D ) = E X
[ max ( 0 , ( 1 − D ( x ))] + E z [ max ( 0 , ( 1 + D ( G ( z )))]
( 2 )
Here Ex , Ez are expected value real inputs and random inputs , respectively , D ( x ) and D ( G ( z )) are the expected estimate of discriminator for real instance to be real and fake instance to be real , respectively .
Feature extractor loss , as in ( 3 ), is discriminator feature based on VGG19 Loss , which is calculated using the below formula . ∅ i ( G ) , ∅ i ( R ) are features of VGG19 layers of generated and real images .
L vgg = | ∅ i ( G ) − ∅ i ( R )| ( 3 )
Flow loss is based on Flownet2.0 21 architecture which contains :
• Flow L1 loss : L1 loss with respect to ground truth flow .
• Flow warp loss : L1 loss between warped and target image .
• Flow mask loss : Loss of occlusion mask .
Calculation of each flow loss is done by as by changing respective input values x and y in ( 4 ). L ( x , y ) = { L 1 , L 2 , … L n } T , L n = | x n − y n |
( 4 )
Combining all these objective functions , the generator aims to minimize , and the discriminator maximizes the function value to get a model with good generative capability .
21 https :// arxiv . org / abs / 1612.01925 122
March 2024