Here, two deep neural networks for primary grading of Korean commercial pig are proposed.
- Back-fat thickness estimation network (BTENet), which simultaneously performs the back-fat area segmentation and thickness estimation.
- Sex classification network (SCNet), which determines the sex classes of pig carcass.
Our models were implemented by tensorflow 2.3 in Python 3.8.6. Pre-trained weights for BTENet and SCNet can be downloaded from https://drive.google.com/drive/folders/1PRBpfRVALwiPbA6JYSB9V-jDl2Rr8FIJ?usp=sharing. important Both pre-trained weights must be placed at [CODE PATH]/weights for execution.
python main_btenet.py --img [IMG] --out [OUT] --device [device]
- [IMG]: image file path, which contain the head-side image of VCS-2000.
- [OUT]: Path for saving the results.
- [device]: GPU device number to use (default: 0).
example
python main_btenet.py --img data/head_img --out btenet_results --device 0
- bf.sol: A text file with a header line, and the one line per sample with 2 columnes. The first column is file name and another is predicted back-fat thickness (mm).
- mask: A file path, which includes the predicted back-fat area mask.
- paint: A file path, which includes visualized prediction results.
python main_scnet.py --img [IMG] --out [OUT] --device [device]
- [IMG]: image file path, which contain the hip-side image of VCS-2000.
- [OUT]: Path for saving the results.
- [device]: GPU device number to use (default: 0).
example
python main_scnet.py --img data/hip_img --out scnet_results --device 0