  Many activity classifications segments data into fixed window size for
feature extraction and classification. However, animal behaviors have various
durations that do not match the predetermined window size. The dense labeling
and dense prediction methods address this limitation by predicting labels for
every point. Thus, by tracing the starting and ending points, we could know the
time location and duration of all occurring activities. Still, the dense
prediction could be noisy with misalignments problems. We modified the U-Net
and Conditional Generative Adversarial Network (cGAN) with customized loss
functions as a training strategy to reduce fragmentation and other
misalignments. In cGAN, the discriminator and generator trained against each
other like an adversarial competition. The generator produces dense
predictions. The discriminator works as a high-level consistency check, in our
case, pushing the generator to predict activities with reasonable duration. The
model trained with cGAN shows better or comparable performance in the cow, pig,
and UCI HAPT dataset. The cGAN-trained modified U-Net improved from 92.17% to
94.66% for the UCI HAPT dataset and from 90.85% to 93.18% for pig data compared
to previous dense prediction work.
