AnomalyDetectionCVPR2018-Pytorch icon indicating copy to clipboard operation
AnomalyDetectionCVPR2018-Pytorch copied to clipboard

Facing an issue when trying another feature extractor

Open Jimmycreative opened this issue 2 years ago • 1 comments

Hi! Sorry to bother you. Currently, I am experimenting with a different feature extractor. The output of the replaced feature extractor is 512. Also, I have printed the one video output of the feature shape of the replaced extractor is (103 512 4 1 1) but C3D output is (103 4096). Is this the reason that cause the following problem.

Replaced feature extractor last layer structure:
(conv2): Sequential(
        (0): Conv3DSimple(512, 512, kernel_size=(3, 3, 3), stride=(1, 1, 1), padding=(1, 1, 1), bias=False)
        (1): BatchNorm3d(512, eps=1e-05, momentum=0.1, affine=True, track_running_stats=True)
      )
      (relu): ReLU(inplace=True)
    )
  )
  (avgpool): AdaptiveAvgPool3d(output_size=(None, 1, 1))
  1. I'm not really sure what the difference is between features = features.numpy() and the feature to_segments(features, n_segments) return by this function call. Could you briefly describe it.
  2. When I run the feature extractor, total 1896 videos and load super slowly. Is this normal?
  3. I have encounter the warning many times when I run the fefature_extractor. will this affect the performance of the extracting feature representation?
2023-03-04 16:04:16,930 VideoIter:: ERROR (line number 83) !! (Force using another index:
364502)
torch.Size([17, 240, 320, 3]) x 16
2023-03-04 16:04:18,011 1210 / 1896:    Dumping features_UCF/Training_Normal_Videos_Anomaly/Normal_Videos137_x264.txt
2023-03-04 16:04:18,415 VideoIter:: ERROR (line number 83) !! (Force using another index:
774731)
  1. Also, it shows below which is strange because I only have total 1896 but it shows 2154?
2023-03-04 16:15:00,638 Video 2154 / 1896 : Writing clip 2673 of video Normal_Videos375_x264
  1. When I run the program TrainingAnomalyDetector_public.py. It keeps printing out below. What is the problem of this? My feature output stored in the txt look like this. Not sure why it store in an array. I didn't change anything of your code
[[[0.0228729248046875]], [[0.032073974609375]], [[0.031951904296875]], 
could not convert string to float: '[[[0.018280029296875]],'
2023-03-04 21:49:21,264 VideoIter:: ERROR!! (Force using another index:
15267)
could not convert string to float: '[[[0.02545166015625]],'
2023-03-04 21:49:21,288 VideoIter:: ERROR!! (Force using another index:

Thank you!

Jimmycreative avatar Mar 02 '23 10:03 Jimmycreative

Hi, I will try to help with that, however, I don't have the video dataset on my machine currently and the original source from which I downloaded the dataset doesn't work for me. Where did you download it from?

ekosman avatar Mar 06 '23 20:03 ekosman