Accuracy graph of binary classification by CNN
There is no way to definitely note how many epochs is required. Your accuracy graphs may be unstable for several reasons such as -

Irregular data distribution
Faulty model
Large batch size (as mentioned in the comments)
Overfitting and underfitting (in this case im not too sure which one)

You can fix it through the following methods -

Analyse your data well and see if one class is heavily grater than other.
Make sure all duplicate images are removed.
Try different models, start with pre-trained. Shouldn't take much compute power.
Approach transfer learning (neural networks)
Adjust learning rate (as mentioned above)
General hyperparameter tuning.

if the dataset is from somewhere public, see the models and the approaches others have used. You might see where your model actually lacks.