-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues when test video/frame feature #8
Comments
Hi could you please try to delete the txt file (in the pretrainedmodel folder): |
Hi, @antoine77340. I have delete graph.pbtxt, but the problem is still. |
Hmm very strange, I don't understand why it tries to look at ../YT8M/youtube-8m/features/ folder. (This is where I store all my tfrecord files). |
Hi, @antoine77340. First i delete all events.out.* files, then put test tfrecord files to ../YT8M/youtube-8m/features/. But occur error as follows: |
@feiyun1265 @antoine77340 I have also met this question and solve it. I'm working on it , and now I have finished a complete function with a video as input and output a label . I could share it , but there are still some difficult problems, I think the result I got is not absolutely right, It's strange and I don't know why did it happended. class Vinfer():
` |
@feiyun1265: I mean you should try to move the Validation AND training tfrecord in this directory (not the test tfrecord). Could you please try that. I am sorry for all of the problems I am actually not really a Tensorflow expert :(. |
Thanks for analysing.@antoine77340 @wincle. I copy validation and training tfrecord to " ../YT8M/youtube-8m/features/". No error before, but occur error as follows: |
@feiyun1265 the shape is not matched ,just expand it to the recommend shape. |
@feiyun1265 And you should ues vggish to extract the audio feature and contact them together then send to the model |
I use youtube-8m dataset. Does the dataset have audio feature? @wincle. and how to use vggish, can you send me some specification link, thanks. |
https://github.com/tensorflow/models/tree/master/research/audioset |
I will have a try, thank you very much. @wincle. |
met the same problem |
I think its the bug of the youtube8m's inference code. It should 1) create the model like eval did or 2) directly use the saved model |
Dear @antoine77340, |
@SharoneDayan I think may be you should try to freeze the model. |
Dear All, After tracing inference.py , I think the inference process stopped at a try-except-finally in "def inference". More specifically, Does anyone know for sure whether the exception happened in coord.should_stop()? BR, |
I also have the same problem when I try to execute the inference code, to be precise the output csv file only has 1 or 2 videos with labels then nothing, my error message follows INFO:tensorflow:num examples processed: 2 elapsed seconds: 2.13 |
the question is why is it trying to look for tfrecords in that particular folder "/YT8M/youtube-8m/features/"? I can't trace where this happens so I can delete it |
num_examples_processed initializes with 0. maybe tf.graphkeys.local_Variables is doing the damage, I read in documentation that this is about objects that are local to each machine. Maybe this is where the paths are saved ? what if instead tf.graphkeys.MODEL_VARIABLES ? what should that be doing ? |
Dear Estathop, $ cat prediction.2.csv where However, even though my output csv now has result, exception still happened as before: 2018-05-18 14:09:11.212298: W tensorflow/core/framework/allocator.cc:101] Allocation of 1140850688 exceeds 10% of system memory. BR, |
No worries, I started using tensorflow recently also, I am not an expert. The problem is in the "try:" block, |
Hi All, I am also getting the similar error when I try to run inference.py over pretrained model released by Antoine. It says: Has anyone solved this problem yet? Thanks in advance |
Hi all, |
@antoine77340 |
Dears, |
Dears, Then I use my own trained model to do inference successfully(XXX.csv is produced and prediction results are printed) |
hi wenching33 how do you solve the problem "InvalidArgumentError: Name: , Context feature 'video_id' is required but could not be found". can you give some details? thanks in advance! |
just don't mix dataset, code etc of 2017 with 2018, because some classes names changed due to GDPR issues |
@chendengshuai I remember that I modify code in readers.py. You can find "vidio_id" in readers.py, and try changing it to "id". |
@antoine77340 thank you for publishing it. Both the process of training (train.py) and the process of evaluation (inference.py) use a queue containing runners that are used to produce and shuffle inputs. To be able to run the process without the files, in inference.py, in the inference function, before the line runners_to_remove = [q_runner for q_runner in sess.graph.get_collection_ref(“queue_runners”) if q_runner.name == “train_input/input_producer” or q_runner.name == ‘train_input/shuffle_batch_join/random_shuffle_queue’] This removes the runners that were saved during the training process, but are no longer needed for evaluation from a pre-trained model. Hope that helps. |
Hi, @antoine77340. I have download youtube-8m dataset. Then, i use video/frame test folder test your pretrained model. But i occur a error when testing, error information as follows:
INFO:tensorflow:number of input files: 4096
INFO:tensorflow:loading meta-graph: pretrainedmodel/model.ckpt-310001.meta
INFO:tensorflow:restoring variables from pretrainedmodel/model.ckpt-310001
INFO:tensorflow:Error reported to Coordinator: <class 'tensorflow.python.framework.errors_impl.NotFoundError'>, ../YT8M/youtube-8m/features/validatelN.tfrecord
[[Node: train_input/ReaderReadV2_1 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](train_input/TFRecordReaderV2_1, train_input/input_producer)]]
Caused by op u'train_input/ReaderReadV2_1', defined at:
File "inference.py", line 203, in
app.run()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "inference.py", line 199, in main
FLAGS.output_file, FLAGS.batch_size, FLAGS.top_k)
File "inference.py", line 128, in inference
saver = tf.train.import_meta_graph(meta_graph_location, clear_devices=True)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py", line 1577, in import_meta_graph
**kwargs)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/meta_graph.py", line 498, in import_scoped_meta_graph
producer_op_list=producer_op_list)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.py", line 287, in import_graph_def
op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2395, in create_op
original_op=self._default_original_op, op_def=op_def)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1264, in init
self._traceback = _extract_stack()
NotFoundError (see above for traceback): ../YT8M/youtube-8m/features/validatelN.tfrecord
[[Node: train_input/ReaderReadV2_1 = ReaderReadV2[_device="/job:localhost/replica:0/task:0/cpu:0"](train_input/TFRecordReaderV2_1, train_input/input_producer)]]
In addition, i use the command begin testing as follows:
python inference.py --output_file=test_video_v1.csv --input_data_pattern="video_test/test*.tfrecord" --model=NetVLADModelLF --train_dir=pretrainedmodel --frame_features=false --batch_size=1024 --base_learning_rate=0.0002 --netvlad_cluster_size=256 --netvlad_hidden_size=1024 --moe_l2=1e-6 --iterations=300 --learning_rate_decay=0.8 --netvlad_relu=False --gating=True --moe_prob_gating=True --run_once=True --top_k=50
Looking forward to your reply, thank you!
The text was updated successfully, but these errors were encountered: