by Hao Lu
The code has been tested on Python 3.7.4 and PyTorch 1.2.0. Please follow the
official instructions to configure your environment. See other required packages
in requirements.txt.
Maize Tassels Counting
- Download the Maize Tassels Counting (MTC) dataset from: BaiduYun (1.64 GB) (code: m8rj) or Google Drive (1.8 GB)
- Unzip the dataset and move it into the
./datafolder, the path structure should look like this:
$./data/maize_tassels_counting_dataset
├──── trainval
│ ├──── images
│ └──── labels
├──── test
│ ├──── images
│ └──── labels
├──── train.txt
├──── test.txt
Run the following command to train TasselNetv2+ on the MTC dataset:
python --cfg config/mtc-tasselnetv2plus.yaml
- Setting
VAL.evaluate_only=FalseandVAL.visualization=False - Use
CUDA_VISIBLE_DEVICEStrick if you have multiple GPUs
If you find some useful tricks and tips, please share it here.
- (Hao Lu) Do not fix bn when training with pretrained models (batch_size=16 tested)
- (Hao Lu) Scale the ground truth by x10 for density-map-based methods when L2 Loss is used (reduction='mean')
Once the training is finished, run the same command above with VAL.evaluate_only=True for inference.
- Setting
VAL.visualization=Trueto output visualizations. Visualizations are saved in the path./results/<dataset>/<exp>/<epoch>.
| Method | Venue, Year | Pretrained | #Param. | MAE | MSE | rMAE | R2 | Model |
|---|---|---|---|---|---|---|---|---|
| CSRNet | CVPR 2018 | VGG16 | 16.3M | 9.43 | 14.43 | 100.65 | 0.7573 | One Drive (116MB) |
| TasselNetv2 | PLME 2019 | No | 525K | 5.42 | 9.21 | 31.94 | 0.8923 | Baidu Yun (2MB) (code: hrhi) |
| TasselNetv2+ | TBD | No | 262K | 5.41 | 9.31 | 37.65 | 0.8937 | Baidu Yun (2MB) (code: hbnx) |
| BCNet-BN | TCSVT 2019 | VGG16 | 14.8M | 5.11 | 9.58 | 27.84 | 0.8749 | Baidu Yun (105MB) (code: mnys) |
| Method | Venue, Year | Resolution | Pretrained | #Param. | MAE | MSE | rMAE | R2 | Model |
|---|---|---|---|---|---|---|---|---|---|
| TasselNetv2+ | TBD | 1/8 | No | 262K | 27.08 | 38.38 | 14.61 | 0.8958 | - |
| TasselNetv2+ | TBD | 1/4 | No | 262K | 16.43 | 25.79 | 9.67 | 0.9515 | Baidu Yun (2MB) (code: 68dn) |
| CSRNet | CVPR 2018 | 1/4 | VGG16 | 16.3M | 14.38 | 20.52 | 9.56 | 0.9704 | One Drive (116MB) |
| BCNet-BN | TCSVT 2019 | 1/4 | VGG16 | 14.8M | 14.37 | 21.37 | 8.75 | 0.9659 | Baidu Yun (105MB) (code: t81t) |