- Make sure you have installed TensorFlow 2.8
- Make sure you have downloaded backbone weights and datasets
- Make sure you prepared the datasets
You may find related guides in docs.
-
Edit or make a new copy of the "configs/pascalcontext_train_resnet50_sa_car.cfg". If you choose to make a new copy, we suggest you change the "--flagfile" to an absolute path.
-
Modify "--checkpoint_dir" and "--tensorboard_dir" to the correct location.
-
Modify "--resnet50_weights_path" to the path of backbone weights (h5) you downloaded (e.g. xxxxx/resnet50_bn.h5)
-
Modify "--pascalcontext_path" to the path of pascalcontext tfrecords dir. (e.g. xxxxx/pascalcontext_tfrecords)
-
cd to "CAR" root folder. (Important for the relative path of "--flagfile").
-
Set 'PYTHONSEED' to 0 in enviroment variable. You may use 'export PYTHONSEED=0' in Linux.
-
Run the following script, if you are using conda, make sure you activated the correct environment:
export PYTHONHASHSEED=0
python train.py --flagfile={path to your cfg file above}