Closed draymondbiao closed 2 years ago
Hi @draymondbiao,
I trained the models with one GTX 1080 TI (11GB). If you get an out of memory (OOM) error, you may try a smaller batch size, 16 should work.
I have successfully finished running the script “ multi_stage_train.py” with batch_size=16. Then I'm going to run the script "predict_bbox_n_full.py" but it show “tensorflow.python.framework.errors_impl.InvalidArgumentError: Invalid JPEG data or crop window, data size 534369” is this means something wrong with test data set? the cammand like this: python3 /data/home/jack/code/classification/predict_bbox_n_full.py --annotations_json=/data/home/meng/pic/metadata/iwildcam2021_train_annotations.json \ --dataset_dir=/data/home/jack/pic/test/ \ --megadetector_results_json=/data/home/jack/parsed/iwildcam2021test_originalimage_megadetector_v4.1_results_parsed.json \ --test_info_json=/data/home/jack/pic/metadata/iwildcam2021_test_information.json \ --submission_file_path=/data/home/jack/code/final_submission.csv \ --model_name=efficientnet-b2 \ --use_bags \ --batch_size=16 \ --input_size=380 \ --input_scale_mode=uint8 \ --ckpt_dir_full=/data/home/jack/code/fixefficientnet_b2_380x380_iwildcam_fulltrain_mdv4_fullimage_16mai_bags_mltstg/ \ --ckpt_dir_bbox=/data/home/jack/code/fixefficientnet_b2_380x380_iwildcam_fulltrain_mdv4_multicrop_26mai_bags_mltstg/ \ --use_flip_image \ --ensemble_method=averaging \ --megadetector_threshold=0.8
It seems that there is a corrupted image. I didn't implement something to verify that. But, you may try to use the script dataset_tools/resize_images.py
to resize all images; this script ignores all corrupted images during the resizing process. Then you have to verify which images are missing and check if the original ones are indeed corrupted.
I want to train this model with Gtx1060 graphics card 8GB but I'm worried about whether this is enough to support the completion of the task